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

Comparing AnyEvent-MP/MP.pm (file contents):
Revision 1.57 by root, Sat Aug 15 04:34:34 2009 UTC vs.
Revision 1.58 by root, Sun Aug 16 02:55:16 2009 UTC

396 396
397sub rcv($@) { 397sub rcv($@) {
398 my $port = shift; 398 my $port = shift;
399 my ($noderef, $portid) = split /#/, $port, 2; 399 my ($noderef, $portid) = split /#/, $port, 2;
400 400
401 ($NODE{$noderef} || add_node $noderef) == $NODE{""} 401 $NODE{$noderef} == $NODE{""}
402 or Carp::croak "$port: rcv can only be called on local ports, caught"; 402 or Carp::croak "$port: rcv can only be called on local ports, caught";
403 403
404 while (@_) { 404 while (@_) {
405 if (ref $_[0]) { 405 if (ref $_[0]) {
406 if (my $self = $PORT_DATA{$portid}) { 406 if (my $self = $PORT_DATA{$portid}) {
505message loss has been detected. No messages will be lost "in between" 505message loss has been detected. No messages will be lost "in between"
506(after the first lost message no further messages will be received by the 506(after the first lost message no further messages will be received by the
507port). After the monitoring action was invoked, further messages might get 507port). After the monitoring action was invoked, further messages might get
508delivered again. 508delivered again.
509 509
510Note that monitoring-actions are one-shot: once released, they are removed
511and will not trigger again.
512
510In the first form (callback), the callback is simply called with any 513In the first form (callback), the callback is simply called with any
511number of C<@reason> elements (no @reason means that the port was deleted 514number of C<@reason> elements (no @reason means that the port was deleted
512"normally"). Note also that I<< the callback B<must> never die >>, so use 515"normally"). Note also that I<< the callback B<must> never die >>, so use
513C<eval> if unsure. 516C<eval> if unsure.
514 517

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines