ey
I'm getting crash when I make alot threads for a lua_State*
although if I make new state each threads no crash but very nuff solution...
1 2 3 4 5 6 7 8
|
lua_State*L=luaL_newstate();
luaL_openlibs(L);
for(int i=0;i<100;++i){
lua_State*T=lua_newthread(L);
luaL_loadfile(T,"c:/clua.lua");
lua_resume(T,L,0);
lua_resume(T,L,0);
};
|
1 2 3 4
|
--lua
coroutine.yield();
print'?';
|
Last edited on
I need lua_pop(L,1); to remove the dead thread but it'll makes me problems because I'll make yield system and idk when I can do lua_pop(L,number);
Last edited on
ah...
I'll just lua_remove(L, lua_gettop(L)); after thread creation...
Last edited on