ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Kernel.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Kernel.pm (file contents):
Revision 1.90 by root, Sat Mar 10 20:34:11 2012 UTC vs.
Revision 1.91 by root, Sun Mar 11 22:34:21 2012 UTC

422 # internal services 422 # internal services
423 423
424 # monitoring 424 # monitoring
425 mon0 => sub { # stop monitoring a port for another node 425 mon0 => sub { # stop monitoring a port for another node
426 my $portid = shift; 426 my $portid = shift;
427 _unmonitor undef, $portid, delete $SRCNODE->{rmon}{$portid}; 427 _unmonitor undef, $portid, delete $NODE{$SRCNODE->{id}}{rmon}{$portid};
428 }, 428 },
429 mon1 => sub { # start monitoring a port for another node 429 mon1 => sub { # start monitoring a port for another node
430 my $portid = shift; 430 my $portid = shift;
431 Scalar::Util::weaken (my $node = $SRCNODE); 431 Scalar::Util::weaken (my $node = $NODE{$SRCNODE->{id}});
432 _monitor undef, $portid, $node->{rmon}{$portid} = sub { 432 _monitor undef, $portid, $node->{rmon}{$portid} = sub {
433 delete $node->{rmon}{$portid}; 433 delete $node->{rmon}{$portid};
434 $node->send (["", kil0 => $portid, @_]) 434 $node->send (["", kil0 => $portid, @_])
435 if $node && $node->{transport}; 435 if $node && $node->{transport};
436 }; 436 };
437 }, 437 },
438 # another node has killed a monitored port 438 # another node has killed a monitored port
439 kil0 => sub { 439 kil0 => sub {
440 my $cbs = delete $SRCNODE->{lmon}{+shift} 440 my $cbs = delete $NODE{$SRCNODE->{id}}{lmon}{+shift}
441 or return; 441 or return;
442 442
443 $_->(@_) for @$cbs; 443 $_->(@_) for @$cbs;
444 }, 444 },
445 445

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines