lua-users home
lua-l archive

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


Hi,

I have a possible issue here... Suppose we have the following call chain:

1. From c++ I instantiate a new lua_State using lua_newthread
2. Call a lua function on the lua_State from point 1
3. Inside the lua function at point 2 a make a call to another c++ function
4. In the function call at the step 3 a make a lua_yield
5. Further processing. Decide that I have to end with the lua_State
6. Make it available to the garbage collector


Now, the question... As you can notice, I never had the chance to lua_resume the lua_State before make it available to garbage collector. Everything looks and works just fine. But since I'm a newbie to lua, I wonder if this approach (not resuming a yielded coroutine before make it available for GC) could have some side effects. So, I think is better to find out now if this could cause problems. Later it might be quite difficult for me to correct the problem since the work flow of the server is tending to get complicated.


Thank you