Re: Timer events with same interval

[email protected] ((Jochen Stenzel))
Newsgroups perl.loop
Message-ID <[email protected]>
Hello, Jeff,

>I've got two timer events with the same interval but different callbacks. 
>One of them gets called, and runs for a time longer than the interval. The
>other never gets called.  

I cannot reproduce this behaviour. Could you please send (simplified?)
example code?

I did the following:

  use Event;

  Event->timer(
               interval => 1,
               cb => sub {warn "1st\n"; sleep 10;},
              );

  Event->timer(
               interval => 1,
               cb => sub {warn "2nd\n";},
              );

  Event::loop;

This example invokes both callbacks (perl 5.6.0, Event 0.83).

            Jochen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.