From 0860a7174bf376faa2f14803d720769b82ba1106 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Sat, 16 Nov 2013 10:37:27 +0100 Subject: Added a comment in keeper_call() --- src/keeper.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/keeper.c b/src/keeper.c index 861597a..9affbdf 100644 --- a/src/keeper.c +++ b/src/keeper.c @@ -692,6 +692,10 @@ int keeper_call( lua_State *K, keeper_api_t _func, lua_State *L, void *linda, ui lua_call( K, 1 + args, LUA_MULTRET); retvals = lua_gettop( K) - Ktos; + // note that this can raise a luaL_error while the keeper state (and its mutex) is acquired + // this may interrupt a lane, causing the destruction of the underlying OS thread + // after this, another lane making use of this keeper can get an error code from the mutex-locking function + // when attempting to grab the mutex again (WINVER <= 0x400 does this, but locks just fine, I don't know about pthread) if( (retvals > 0) && luaG_inter_move( K, L, retvals, eLM_FromKeeper) != 0) // K->L { retvals = -1; -- cgit v1.2.3-55-g6feb