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.41 by root, Sat Aug 8 21:56:29 2009 UTC vs.
Revision 1.42 by root, Sun Aug 9 00:41:49 2009 UTC

501 501
502=item $guard = mon $port 502=item $guard = mon $port
503 503
504=item $guard = mon $port, $rcvport, @msg 504=item $guard = mon $port, $rcvport, @msg
505 505
506Monitor the given port and do something when the port is killed, and 506Monitor the given port and do something when the port is killed or
507optionally return a guard that can be used to stop monitoring again. 507messages to it were lost, and optionally return a guard that can be used
508to stop monitoring again.
509
510C<mon> effectively guarantees that, in the absence of hardware failures,
511that after starting the monitor, either all messages sent to the port
512will arrive, or the monitoring action will be invoked after possible
513message loss has been detected. No messages will be lost "in between"
514(after the first lost message no further messages will be received by the
515port). After the monitoring action was invoked, further messages might get
516delivered again.
508 517
509In the first form (callback), the callback is simply called with any 518In the first form (callback), the callback is simply called with any
510number of C<@reason> elements (no @reason means that the port was deleted 519number of C<@reason> elements (no @reason means that the port was deleted
511"normally"). Note also that I<< the callback B<must> never die >>, so use 520"normally"). Note also that I<< the callback B<must> never die >>, so use
512C<eval> if unsure. 521C<eval> if unsure.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines