[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Which thread does the garbage collector run in?
- From: Chris <coderight@...>
- Date: Thu, 7 Dec 2006 15:53:53 -0500
I'm using the lua_lock mechanism and have several native threads
running several Lua states created with lua_newthread. In which of
these threads is the garbage collector going to run? Does it only run
from the main original thread created with lua_open?
This can be very important especially for userdata types that can only
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