Make sure thread:join() returns the 'true' value before the child threads results.

pull/1/head
Robert G. Jakabosky 15 years ago
parent 0c4e09228b
commit 8191c830cf

@ -962,7 +962,7 @@ static int Lua_LLThread__join__meth(lua_State *L) {
int top = lua_gettop(child->L);
/* return results to parent thread. */
llthread_push_results(L, child, 2, top);
return top - 1;
return top;
} else {
res_idx1 = false;
err_msg_idx2 = strerror(rc);

@ -345,7 +345,7 @@ static Lua_LLThread *llthread_create(lua_State *L, const char *code, size_t code
int top = lua_gettop(child->L);
/* return results to parent thread. */
llthread_push_results(L, child, 2, top);
return top - 1;
return top;
} else {
${res} = false;
${err_msg} = strerror(rc);

Loading…
Cancel
Save