in reply to Re^2: AnyEvent: How to protect critical sections?
in thread AnyEvent: How to protect critical sections?
Then I would cancel the timer when starting the HTTP request, and relaunch the timer in the HTTP request on_body callback (and likely in the on_error callback too). You can "immediately" launch a timer by launching it with after => 0 - this will launch the timer callback the next time the event loop is entered.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: AnyEvent: How to protect critical sections?
by saintmike (Vicar) on May 17, 2011 at 20:56 UTC | |
by Corion (Patriarch) on May 17, 2011 at 21:03 UTC | |
by saintmike (Vicar) on May 17, 2011 at 21:25 UTC | |
by Anonymous Monk on May 18, 2011 at 19:55 UTC |
In Section
Seekers of Perl Wisdom