EV and the order of callback invocation

Brandon Black blblack at gmail.com
Wed Dec 14 16:19:03 CET 2011

On Wed, Dec 14, 2011 at 2:10 AM, Marios Titas <redneb8888 at gmail.com> wrote:
> 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);

The ev.pod documentation notes that: "Due to some design glitches inside
libev, child watchers will always be handled at maximum priority (their
priority is set to EV_MAXPRI by libev)"

-- Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20111214/8cbf50e9/attachment.html>

More information about the libev mailing list