lua-users home
lua-l archive

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


I have a question too, about the emergency gc. Is it planned to
provide a C API to trigger it explicitely ?

My use case would be a I/O library, which open files. If the
underlying operating system returns an error of the kind "no more file
descriptor available", it would be nice to trigger an emergency gc,
hoping for some of the collected userdata to release such file
descriptors. After all, even if the Lua GC manages only memory, it
also indirectly manages any resource held by userdata objects and
released on __gc calls.