lua-users home
lua-l archive

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


> [...]
> This is controlled by a global mutex. However, Lua code can call a C
> function that releases this mutex while the C function executes. This
> C function may block for various reasons, leaving the C stack and the
> Lua coroutine stack frozen until the function returns. In the
> meantime, another event may occur and  another "C thread/coroutine"
> combination may run. This worked great in 5.1 since each Lua coroutine
> state kept all data for the call in lua_State. I have thousands of
> runtime hours in 5.1 that confirmed that our threading construction
> worked. However, this is no longer the case (at least not with
> nCcalls) since the now global nCcalls variable is wrong from one state
> to another when using multiple native threads that can suspend.

What release of Lua 5.1 are you using?

-- Roberto