lua-users home
lua-l archive

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


I'm looking at the same thing now with my code. PiL p297 (memory management, garbage collector's API) gives you more control over the collection.

But I'm not sure - if you run the collector in the parent lua_State, will this run the collector in the child states?

On Dec 7, 2006, at 1:06 PM, Chris wrote:

I should have done more testing.  Running collectgarbage() in another
thread seems to trigger the garbage collector from that thread.  So it
appears the garbage collector may (randomly) run from any active
thread.  So it's even worse than I thought :)

CR


On 12/7/06, Chris <coderight@gmail.com> wrote:
be collected in the thread they were created in.  From my tests it
looks like the garbage collector runs only in the original thread and
may collect objects that it didn't create which is likely to cause
problems.