lua-users home
lua-l archive

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

* Luiz Henrique de Figueiredo:

>> - for example, being able to call an API function that returns 0 or 1
>> to indicate whether the GC is currently running or not.
> Why? What can will you do with that information?

If you want to call fork() from Lua code, you have to disable the GC
so that finalization doesn't occur both in the child and the parent.
If this happens in a library routine, you need to make sure that the
code composes with callers needing to disable GC as well.  And this
means that you need some sort of counter.