[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Which thread does the garbage collector run in?
- From: Graham Wakefield <lists@...>
- Date: Fri, 8 Dec 2006 09:57:14 -0800
Or, can you turn GC on and off for different child states (made with
lua_newthread) individually, using lua_gc(childL, GCSTOP, 0) and
lua_gc(childL, GCRESTART, 0) etc.?
On Dec 8, 2006, at 9:41 AM, Graham Wakefield wrote:
I'm looking at the same thing now with my code. PiL p297 (memory
management, garbage collector's API) gives you more control over
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.
appears the garbage collector may (randomly) run from any active
thread. So it's even worse than I thought :)
On 12/7/06, Chris <email@example.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
may collect objects that it didn't create which is likely to cause