lua-users home
lua-l archive

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

Edgar Toernig wrote:

Are Lua-only coroutines really required? Small survey?

- Who is using them at the moment?
- Are the Lua-only couroutines good enough for you?
- Would you switch to C-level coroutines if they were
We are using them. It's extremely important to us that each coroutine have a minimal memory impact, because we could potentially have tens of thousands of them.

It's actually extremely infrequent that we ever run into a situation that Lua coroutines cannot handle. We just don't have very much C code called from Lua which in turn calls other Lua code. The C functions available to our Lua state are almost all "leaf" functions in the control flow graph. So no, it wouldn't be worthwhile to switch for us.