aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2013-11-16 10:37:27 +0100
committerBenoit Germain <bnt.germain@gmail.com>2013-11-16 10:37:27 +0100
commit0860a7174bf376faa2f14803d720769b82ba1106 (patch)
treea9b1273ab461f0e89133eb0725cff124d3f34836 /src
parent268f43638fe4969c216a6a138f259dd36a89b5c0 (diff)
downloadlanes-0860a7174bf376faa2f14803d720769b82ba1106.tar.gz
lanes-0860a7174bf376faa2f14803d720769b82ba1106.tar.bz2
lanes-0860a7174bf376faa2f14803d720769b82ba1106.zip
Added a comment in keeper_call()
Diffstat (limited to 'src')
-rw-r--r--src/keeper.c4
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;