diff options
-rw-r--r-- | src/keeper.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 | |||
692 | lua_call( K, 1 + args, LUA_MULTRET); | 692 | lua_call( K, 1 + args, LUA_MULTRET); |
693 | 693 | ||
694 | retvals = lua_gettop( K) - Ktos; | 694 | retvals = lua_gettop( K) - Ktos; |
695 | // note that this can raise a luaL_error while the keeper state (and its mutex) is acquired | ||
696 | // this may interrupt a lane, causing the destruction of the underlying OS thread | ||
697 | // after this, another lane making use of this keeper can get an error code from the mutex-locking function | ||
698 | // when attempting to grab the mutex again (WINVER <= 0x400 does this, but locks just fine, I don't know about pthread) | ||
695 | if( (retvals > 0) && luaG_inter_move( K, L, retvals, eLM_FromKeeper) != 0) // K->L | 699 | if( (retvals > 0) && luaG_inter_move( K, L, retvals, eLM_FromKeeper) != 0) // K->L |
696 | { | 700 | { |
697 | retvals = -1; | 701 | retvals = -1; |