lua-users home
lua-l archive

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


I'm creating coroutines from C (using lua_newthread) and resuming them from C (using lua_resume).  They may in turn call coroutine.yield(), which returns control to C.  I need to be able to 'abort' some of these threads in this yielded state, again from C, freeing up all their resources.  If possible, I want to be able to do this without trashing the thread's lua state itself, so that I can re-use it (I have a 'thread pool' of lua States).

Is it possible, and if so, how do I 'abort' and 'clear' the lua state?

Thanks

grrr waaa
www.grahamwakefield.net