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.68 by root, Fri Aug 28 23:06:33 2009 UTC vs.
Revision 1.69 by root, Sun Aug 30 18:51:49 2009 UTC

162 162
163=item $nodeid = node_of $port 163=item $nodeid = node_of $port
164 164
165Extracts and returns the node ID from a port ID or a node ID. 165Extracts and returns the node ID from a port ID or a node ID.
166 166
167=item initialise_node $profile_name 167=item initialise_node $profile_name, key => value...
168 168
169Before a node can talk to other nodes on the network (i.e. enter 169Before a node can talk to other nodes on the network (i.e. enter
170"distributed mode") it has to initialise itself - the minimum a node needs 170"distributed mode") it has to initialise itself - the minimum a node needs
171to know is its own name, and optionally it should know the addresses of 171to know is its own name, and optionally it should know the addresses of
172some other nodes in the network to discover other nodes. 172some other nodes in the network to discover other nodes.
175never) before calling other AnyEvent::MP functions. 175never) before calling other AnyEvent::MP functions.
176 176
177The first argument is a profile name. If it is C<undef> or missing, then 177The first argument is a profile name. If it is C<undef> or missing, then
178the current nodename will be used instead (i.e. F<uname -n>). 178the current nodename will be used instead (i.e. F<uname -n>).
179 179
180The function then looks up the profile in the aemp configuration (see the 180The function first looks up the profile in the aemp configuration (see the
181L<aemp> commandline utility). 181L<aemp> commandline utility). the profile is calculated as follows:
182
183First, all remaining key => value pairs will be used. Then they will be
184overwritten by any values specified in the global default configuration
185(see the F<aemp> utility), then the chain of profiles selected, if
186any. That means that the values specified in the profile have highest
187priority and the values specified via C<initialise_node> have lowest
188priority.
182 189
183If the profile specifies a node ID, then this will become the node ID of 190If the profile specifies a node ID, then this will become the node ID of
184this process. If not, then the profile name will be used as node ID. The 191this process. If not, then the profile name will be used as node ID. The
185special node ID of C<anon/> will be replaced by a random node ID. 192special node ID of C<anon/> will be replaced by a random node ID.
186 193

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines