Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: AnyEvent: How to protect critical sections?

by saintmike (Vicar)
on May 17, 2011 at 20:56 UTC ( [id://905364]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
           
    $condvar->lock();
    http_get "http://blah", sub { $condvar->unlock();
         print $_[1] };
    
  2. or download this
    sub timer_callback {
        $condvar->lock();
        # ...
        $condvar->unlock();
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://905364]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (None)
    As of 2024-04-25 01:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found