lua-users home
lua-l archive

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


An interesting fix would be to have a way to defer collection.  If in
the __gc metamethod you could return true/false as to whether or not
the object is ready for collection that would work for my situation.
With this I could delay collection until the main thread ran the
collection.  Seems like a simple change but after looking at lgc.c I'm
not sure where to start.

Of course that is still not an ideal fix but it would work for me.  An
ideal fix would have a separate collector for each thread.  It would
be OK if they all ran at once when any collection is triggered (or
they could even run one after another for each thread to reduce mutex
thrashing).