Lua 5.2.2 Broken Threading System
问题 Ey, I'm making threading system in lua and I have a crash when I resume a lot threads... I'm noob in C Lua and I don't really know what is the good or bad what I'm doing in the next codes... I flagged crash places with "//maybe here" #include<cstdio> #include<ala_lua.h> extern"C"{ void __stdcall Sleep(unsigned long); }; int main(){ lua_State*L=luaL_newstate(); luaL_openlibs(L); luaA_libs(L); lua_State*T=lua_newthread(L); luaL_loadfile(T,"c:/clua.lua"); co_resume(T); do{ Sleep(1); }while(co