Hi!

The example is in Perl, but I suppose issue is with libev, not EV.
EV-4.03 doesn't have this issue, EV-4.10 to 4.22 have this issue.
It may be related to improvement for low resolution clock mentioned in
this list for 4.10 (May 2011).

Problem is: timer for < 1sec doesn't invoked by first RUN_ONCE.

$ cat ev-4.10_bug 
#!/usr/bin/perl
use EV;
print "EV-$EV::VERSION\n";
my $w = EV::timer $ARGV[0], 0, sub { print "timer\n" };
print "ONE\n";
EV::run(EV::RUN_ONCE);
print "TWO\n";
EV::run(EV::RUN_ONCE);

$ ./ev-4.10_bug 0.1
EV-4.03
ONE
timer
TWO

$ ./ev-4.10_bug 0.1
EV-4.10
ONE
TWO
timer

$ ./ev-4.10_bug 1
EV-4.10
ONE
timer
TWO

With 0.9 sec versions 4.10-4.22 works unreliably: sometimes timer invoked
by first RUN_ONCE, sometimes not - so I've used 0.1 and 1 sec in this
example.

-- 
                        WBR, Alex.

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev

Reply via email to