lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lets assume we have a MainState, and a "ThreadTable" in the global table

lua_getfield(MainState, LUA_GLOBALSINDEX, "ThreadTable");
lua_State *thread = lua_newthread(MainState);
luaL_ref(MainState, -2);
lua_pop(MainState,1);