lua-users home
lua-l archive

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


If you create the thread and you *don't* keep a reference to it then
the thread will be eligible for garbage collection.  Could it be that
the only reason that any of your threads do run is because although
they are eligible for garbage collection, they haven't been collected
*yet*.

This would be easy to check by running a full garbage collection cycle
every frame (I'm guessing it's a game if it's 30Hz, right?).  Do this
by calling lua_gc with LUA_GCCOLLECT.  See
http://www.lua.org/manual/5.1/manual.html#lua_gc  This will slow
things down a bit, so consider removing it again when you have
finished debugging.