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

Comparing cvsroot/AnyEvent-MP/MP/Kernel.pm (file contents):
Revision 1.40 by root, Fri Sep 4 21:01:22 2009 UTC vs.
Revision 1.41 by root, Fri Sep 4 22:30:29 2009 UTC

217=cut 217=cut
218 218
219sub snd_to_func($$;@) { 219sub snd_to_func($$;@) {
220 my $nodeid = shift; 220 my $nodeid = shift;
221 221
222 ($NODE{$nodeid} || add_node $nodeid) 222 return ($NODE{$nodeid} || add_node $nodeid)->send (["", @_])
223 ->send (["", @_]); 223 if $nodeid ne $NODE;
224
225 # on $NODE, we artificially delay... (for spawn)
226 # this is very ugly - maybe we should simply delay ALL messages,
227 # to avoid deep recursion issues. but that's so... slow...
228 my @msg = ("", @_);
229 my $to; $to = AE::timer 0, 0, sub {
230 undef $to;
231 $NODE{""}->send (\@msg);
232 };
224} 233}
225 234
226=item snd_on $node, @msg 235=item snd_on $node, @msg
227 236
228Executes C<snd> with the given C<@msg> (which must include the destination 237Executes C<snd> with the given C<@msg> (which must include the destination

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines