lua-users home
lua-l archive

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


Wow, it's working now, it was so simple...

Thank you a lot for your help,
LiF.

----- Original Message ----- From: "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Friday, July 27, 2007 2:37 PM
Subject: Re: Re-using a thread without reloading the LUA file, from C/C++


- Does anybody know how to keep the function in the thread ?

Duplicate it with lua_pushvalue before pushing the argument and resuming.
Make sure that the stack is at the same level when you resume again (that is,
pop all values returned by lua_resume).