Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: AnyEvent: How to protect critical sections?by Corion (Patriarch) |
on May 17, 2011 at 20:25 UTC ( [id://905355]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|