lua-users home
lua-l archive

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


I have found this post from february 2010 saying that it should be ok, as long as I use a new thread (created with lua_newthread) as Lua context and only use it for the callback.


On Fri, Dec 31, 2010 at 11:53 PM, Gaspard Bucher <gaspard@teti.ch> wrote:
I think I am doing something evil but I'd like some internal highlights on why this does not work:

Scenario:


thread A --> pcall(1) --> in Lua --> in C (unlock, sleep) ... wait for lock . .........lock --> end pcall(1)

thread B ... wait for lock ............... lock, pcall(2) --> in Lua --> end pcall(2), unlock


Is this ok ? If it is not, how can I keep track of multiple "paths" into the application ?

Many thanks for any help,

Gaspard