lua-users home
lua-l archive

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

On 2/2/06, Chris <> wrote:
I'm running threaded code and have defined the lua_Lock functions.  Each thread has it's own lua_State created via lua_open and there is one global lock that they all use for synchronization.  The problem is that when one thread exits the state is closed with lua_close.  After that all the threads freeze solid because it looks like lua_close calls lua_Lock but never unlocks.

Is this normal or what?

Hmm, I think we are getting off my original topic.

The problem is that if you spawn two threads, each running Lua universes, and then one ends and closes, the other will freeze because the lock is not released.

// Chris