lua-users home
lua-l archive

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

Hello, I am facing a bug with lua_newthread. I have a program where
the user can create several objects. each object has its own script so
for each object i am using lua_newthread to have its own stack and
code flow.
After a while i noticed that the program crashed when the number of
objects incremented, So i tried this small test from C:

lua_State *L = luaL_newstate();
for(int i =0; i < 88; ++i)
       lua_State * test = lua_newthread(L);

seems the program just crashes after 86 threads at traversetable function ...
can't we create many threads at once? or am i doing something wrong?