lua-users home
lua-l archive

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


Hello,
i run some coroutines in my application and sometime i want to interrupt such coroutine and never continue in it. I got something like
this.
...
state = lua_newthread( globalState );
lua_sethook( state, luaHook, LUA_MASKCOUNT, 10 );
...
luaL_loadbuffer(state, command, strlen(command), desc)
lua_resume(state,0)
....

and then in luaHook i occasionaly yield the coroutine. But sometimes i decide to interrupt execution of (yielded) command in this coroutine. And it is my problem. I don't know how to mark this coroutine to be garbage collectable? Is it possible?

Thanks for help in advance,

Jan Kratochvil
Illussion softworks, a.s