lua-users home
lua-l archive

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


> But still I'm curious. What if I modify the garbage collector and
> make it lock the same mutex before it starts? Is GC the only problem
> here, and this recipe will solve it?

No, the other threads are not contending for that mutex.  So when some thread is about to start a GC cycle you'll have to actively interrupt all other threads.  To this end you could use a hook.  However, I suspect that it is hardly worth the trouble.  Anyway, if you come up with something it would be interesting to hear about it!

--
Wim