Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Coroutines in Perl

by PhilHibbs (Hermit)
on May 11, 2004 at 10:48 UTC ( [id://352395]=note: print w/replies, xml ) Need Help??


in reply to Re: Re^3: Coroutines in Perl
in thread Coroutines in Perl

With a pair of coroutines working togetger, you are unlikely to get synchronisation problems unless they are badly written. However, in the more general case of continuations, I don't think you can disregard synchronisation problems with coroutines, in the same way that you can't disregard sync problems with emulating threads on a single CPU.

If all your locking or resource acquisition is done in a single step, then you should be ok, but if there are any yields in between resource acquisitions, then you need to avoid deadlock. I suppose the co-operative nature of continuations means that you can avoid them easily, so you may be right.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (None)
    As of 2024-04-18 23:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found