[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Anchoring co-routines and properly dropping references to allow GC to clean them up
- From: Chris Gagnon <cgagnon@...>
- Date: Tue, 6 Oct 2009 17:19:16 -0700
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);