lua-users home
lua-l archive

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


Title: reusing coroutines

Is it possible to re-use the lua_State objects from a coroutine (either live or dead) via the C API?  I don't have a good understanding of what would be required to "reset" a lua_State so that it can be re-used by a new coroutine, but if it's possible then it would save us some memory allocation and GC overhead in our application.

There was a thread over a year ago relating to a similar issue (resetting a coroutine back to its initial state), but this is slightly different, and possibly easier to accomplish (?) .

Any pointers would be appreciated.

Thanks,
Jasmin