[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua coroutine using
- From: Enrico Colombini <erix@...>
- Date: Mon, 27 Oct 2008 17:16:10 +0100
(because AFAIK we can't add Lua code to early created coroutine)
If you don't want to use many coroutines, you could add code indirectly,
by having a coroutine execute a list of functions from a table that you
update by inserting/removing/replacing functions (in that case you
shouldn't use ipairs to walk the table, but check the index with #table
after every routine execution).
It may or may not be practical, depending on your usage.