in reply to Re^3: AnyEvent: How to protect critical sections?
in thread AnyEvent: How to protect critical sections?
Nice idea, that could actually work, I'll try that in a minute.
I was just hoping that there was some kind of $condvar->send/recv mechanism that supported lock()/unlock() so that I could write something like
$condvar->lock(); http_get "http://blah", sub { $condvar->unlock(); print $_[1] };
sub timer_callback { $condvar->lock(); # ... $condvar->unlock(); }
In Section
Seekers of Perl Wisdom