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.103 by root, Sat Oct 17 01:42:39 2009 UTC vs.
Revision 1.109 by root, Wed Dec 30 15:49:05 2009 UTC

155 155
156use AE (); 156use AE ();
157 157
158use base "Exporter"; 158use base "Exporter";
159 159
160our $VERSION = 1.22; 160our $VERSION = 1.26;
161 161
162our @EXPORT = qw( 162our @EXPORT = qw(
163 NODE $NODE *SELF node_of after 163 NODE $NODE *SELF node_of after
164 configure 164 configure
165 snd rcv mon mon_guard kil psub peval spawn cal 165 snd rcv mon mon_guard kil psub peval spawn cal
190 190
191Before a node can talk to other nodes on the network (i.e. enter 191Before a node can talk to other nodes on the network (i.e. enter
192"distributed mode") it has to configure itself - the minimum a node needs 192"distributed mode") it has to configure itself - the minimum a node needs
193to know is its own name, and optionally it should know the addresses of 193to know is its own name, and optionally it should know the addresses of
194some other nodes in the network to discover other nodes. 194some other nodes in the network to discover other nodes.
195
196The key/value pairs are basically the same ones as documented for the
197F<aemp> command line utility (sans the set/del prefix).
195 198
196This function configures a node - it must be called exactly once (or 199This function configures a node - it must be called exactly once (or
197never) before calling other AnyEvent::MP functions. 200never) before calling other AnyEvent::MP functions.
198 201
199=over 4 202=over 4
650 653
651=item kil $port[, @reason] 654=item kil $port[, @reason]
652 655
653Kill the specified port with the given C<@reason>. 656Kill the specified port with the given C<@reason>.
654 657
655If no C<@reason> is specified, then the port is killed "normally" (ports 658If no C<@reason> is specified, then the port is killed "normally" -
656monitoring other ports will not necessarily die because a port dies 659monitor callback will be invoked, but the kil will not cause linked ports
657"normally"). 660(C<mon $mport, $lport> form) to get killed.
658 661
659Otherwise, linked ports get killed with the same reason (second form of 662If a C<@reason> is specified, then linked ports (C<mon $mport, $lport>
660C<mon>, see above). 663form) get killed with the same reason.
661 664
662Runtime errors while evaluating C<rcv> callbacks or inside C<psub> blocks 665Runtime errors while evaluating C<rcv> callbacks or inside C<psub> blocks
663will be reported as reason C<< die => $@ >>. 666will be reported as reason C<< die => $@ >>.
664 667
665Transport/communication errors are reported as C<< transport_error => 668Transport/communication errors are reported as C<< transport_error =>
979L<AnyEvent::MP::Kernel> - more, lower-level, stuff. 982L<AnyEvent::MP::Kernel> - more, lower-level, stuff.
980 983
981L<AnyEvent::MP::Global> - network maintainance and port groups, to find 984L<AnyEvent::MP::Global> - network maintainance and port groups, to find
982your applications. 985your applications.
983 986
987L<AnyEvent::MP::DataConn> - establish data connections between nodes.
988
984L<AnyEvent::MP::LogCatcher> - simple service to display log messages from 989L<AnyEvent::MP::LogCatcher> - simple service to display log messages from
985all nodes. 990all nodes.
986 991
987L<AnyEvent>. 992L<AnyEvent>.
988 993

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines