From 6bdf9c79111a34a6f54bb7edcd68ae86ca13daed Mon Sep 17 00:00:00 2001 From: benoit-germain Date: Tue, 15 Nov 2011 16:52:57 +0100 Subject: bugfix: restore ABOUT info where it belongs, in the lanes module table, instead of the global scope. --- src/lanes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lanes.lua b/src/lanes.lua index 6ba0ef3..d56e05f 100644 --- a/src/lanes.lua +++ b/src/lanes.lua @@ -82,7 +82,7 @@ local pairs= assert( pairs ) local tostring= assert( tostring ) local error= assert( error ) -ABOUT= +lanes.ABOUT= { author= "Asko Kauppi ", description= "Running multiple Lua states in parallel", -- cgit v1.2.3-55-g6feb From 3333a7244e9dc2c95c265650a8a236b7b0ddefe0 Mon Sep 17 00:00:00 2001 From: benoit-germain Date: Tue, 15 Nov 2011 17:20:08 +0100 Subject: crashfix: WIN32 builds shouldn't THREAD_WAIT on a THREAD_KILL'ed thread, (but pthread builds must still do it to make sure the thread is no longger running) --- src/lanes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lanes.c b/src/lanes.c index 40af6c0..676032a 100644 --- a/src/lanes.c +++ b/src/lanes.c @@ -1153,8 +1153,10 @@ static int selfdestruct_atexit( lua_State *L) if( !THREAD_ISNULL( s->thread)) // can be NULL if previous 'soft' termination succeeded { THREAD_KILL( &s->thread); - // make sure the thread is really stopped! +#if THREADAPI == THREADAPI_PTHREAD + // pthread: make sure the thread is really stopped! THREAD_WAIT( &s->thread, -1, &s->done_signal_, &s->done_lock_, &s->status); +#endif // THREADAPI == THREADAPI_PTHREAD } // NO lua_close() in this case because we don't know where execution of the state was interrupted #if THREADWAIT_METHOD == THREADWAIT_CONDVAR -- cgit v1.2.3-55-g6feb