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,

----- Original Message ----- From: "Luiz Henrique de Figueiredo" <>
To: "Lua list" <>
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).