Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Cvs P5ee > [svn:p5ee] r108...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 677 of 694
Post > Topic >>

[svn:p5ee] r10850 - p5ee/trunk/App-Context/lib/App/Context/POE

by spadkins@[EMAIL PROTECTED] Feb 28, 2008 at 11:47 AM

Author: spadkins
Date: Thu Feb 28 11:47:37 2008
New Revision: 10850

Modified:
   p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm
   p5ee/trunk/App-Context/lib/App/Context/POE/Server.pm

Log:
minor changes to add the results hash to the callback event (allowing
request_msg to get set correctly on hotel_shop_request)

Modified: p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Context/POE/ClusterNode.pm	Thu Feb 28
11:47:37 2008
@[EMAIL PROTECTED]
 -48,8 +48,8 @[EMAIL PROTECTED]
     die "Node must have a controller host and port defined
(\$context->{options}{controller_host} and {controller_port})"
         if (!$self->{controller_host} || !$self->{controller_port});
 
-    push(@[EMAIL PROTECTED]
>{poe_states}}, "poe_cancel_async_event");
-    push(@[EMAIL PROTECTED]
>{poe_ikc_published_states}}, "poe_cancel_async_event");
+    push(@[EMAIL PROTECTED]
>{poe_states}}, qw(poe_cancel_async_event));
+    push(@[EMAIL PROTECTED]
>{poe_ikc_published_states}},
qw(poe_cancel_async_event));
 
     $self->_init_poe($options);
 

Modified: p5ee/trunk/App-Context/lib/App/Context/POE/Server.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context/POE/Server.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Context/POE/Server.pm	Thu Feb 28
11:47:37 2008
@[EMAIL PROTECTED]
 -500,10 +500,10 @[EMAIL PROTECTED]
     return($assigned);
 }
 
+### This is used by the node, but overridden by the controller
 sub send_async_event_now {
     &App::sub_entry if ($App::trace);
     my ($self, $event, $callback_event) = @[EMAIL PROTECTED]
    $self->log({level=>3}, "send_async_event_now enter:
$event->{name}.$event->{method} : $event->{destination}\n");
 
     if ($event->{destination} eq "in_process") {
         my $event_token = $self->send_async_event_in_process($event,
$callback_event);
@[EMAIL PROTECTED]
 -538,7 +538,6 @[EMAIL PROTECTED]
         my $runtime_event_token = $pid;
         $self->{running_async_event}{$runtime_event_token} = [ $event,
$callback_event ];
     }
-    $self->log({level=>3}, "send_async_event_now exit\n");
     &App::sub_exit() if ($App::trace);
 }
 =head2 wait_for_event()
@[EMAIL PROTECTED]
 -612,10 +611,10 @[EMAIL PROTECTED]
         if ($callback_event) {
             $callback_event->{args} = [] if (! $callback_event->{args});
             my $errmsg = ($exitval || $sig) ? "Exit $exitval on $pid
[sig=$sig]" : "";
-            push(@[EMAIL PROTECTED]
>{args}}, { event_token =>
$callback_event->{event_token},
-                                               returnval => $returnval,
-                                               errnum => $exitval,
-                                               errmsg => $errmsg });
+            push(@[EMAIL PROTECTED]
>{args}[2]{args}}, { event_token =>
$callback_event->{event_token},
+                                                        returnval =>
$returnval,
+                                                        errnum =>
$exitval,
+                                                        errmsg => $errmsg
});
             $self->send_event($callback_event);
         }
         elsif ($sig == 9) {  # killed without a chance to finish its work




 1 Posts in Topic:
[svn:p5ee] r10850 - p5ee/trunk/App-Context/lib/App/Context/POE
spadkins@[EMAIL PROTECTED  2008-02-28 11:47:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 15:03:19 CDT 2008.