lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Friday 10 February 2006 7:19 am, David Given wrote:
> I remember reading on the list that using a scheduler in this way is not
> compatible with using coroutines to invert control flow, for example when
> using a producer/consumer system. This seems to be because the scheduler
> would have to resume a particular thread with coroutine.resume(), which
> means that when that thread yields, expecting to go back to its caller,
> it'll instead end up at the scheduler.

i think it can be used, but you have to use some caution.  in fact, some of 
the core Xavante routines use contron inversion (to give a complex sequence 
as an iterator), all under Copas' coroutine scheduler.


Attachment: pgpKtvhGn_Id6.pgp
Description: PGP signature