Added Thread:isRunning

This commit is contained in:
Alex Szpakowski
2013-07-16 00:18:04 -03:00
parent 719e9253da
commit 8ac288876d
10 changed files with 42 additions and 11 deletions
+8
View File
@@ -65,10 +65,18 @@ int w_Thread_getError(lua_State *L)
return 1;
}
int w_Thread_isRunning(lua_State *L)
{
LuaThread *t = luax_checkthread(L, 1);
luax_pushboolean(L, t->isRunning());
return 1;
}
static const luaL_Reg type_functions[] = {
{ "start", w_Thread_start },
{ "wait", w_Thread_wait },
{ "getError", w_Thread_getError },
{ "isRunning", w_Thread_isRunning },
{ 0, 0 }
};