lua-users home
lua-l archive

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


Didro wrote:
(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.

  Enrico