"be consistent" | |
PerlMonks |
Re: Re: Coroutines in Perlby mrd (Beadle) |
on May 07, 2004 at 17:46 UTC ( [id://351552]=note: print w/replies, xml ) | Need Help?? |
The main diffrenece between coroutines and threads is that threads are meant to run in "paralel" (and they *really* do on multiprocessor machines), while coroutines are not. Therefore, when using coroutines, there is no need to worry about synchronisation, race conditions, starvation, you know ... stuff that plagues "multithreaded programming". For an excelent discussion of coroutines and how they work in Lua, see this paper: http://www.inf.puc-rio.br/~roberto/docs/corosblp.pdf
In Section
Seekers of Perl Wisdom
|
|