in reply to AnyEvent: How to protect critical sections?
If you have code you don't want interrupted, don't yield to AnyEvent functions, it's that simple.
AnyEvent does not run anything in parallel, so as long as you are running your own Perl code, and not calling ->recv, ->send or ->timer, the AnyEvent loop won't run and your code will stay in the critical section uninterrupted.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: AnyEvent: How to protect critical sections?
by saintmike (Vicar) on May 17, 2011 at 20:37 UTC | |
by Corion (Patriarch) on May 17, 2011 at 20:43 UTC | |
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 | |
| |
Re^2: AnyEvent: How to protect critical sections?
by Anonymous Monk on May 18, 2011 at 20:00 UTC |
In Section
Seekers of Perl Wisdom