EV and the order of callback invocation
Marios Titas
redneb8888 at gmail.com
Wed Dec 14 09:10:38 CET 2011
Hi all,
I am trying to use priorities in order to control the order of
invocation of the callbacks but it doesn't seem to work. For example
consider the following perl program:
use EV;
my $pid = fork or exec qw(sleep 1);
my $w1; $w1 = EV::child $pid, 0, sub{undef $w1; print "1\n"};
my $w2; $w2 = EV::child $pid, 0, sub{undef $w2; print "1\n"};
$w2->priority(1);
EV::loop
then $w1 is always invoked first no matter what the priorities are. Am
I missing something obvious here? Also, can I rely on the fact that
callbacks for the same event will always be called in the order they
were registered?
Thanks
More information about the libev
mailing list