lua-users home
lua-l archive

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


Just wondering, would it be possible to inject the upcoming LuaJIT 2
with a patch like the 'finalizer'[1] one?

Certain workloads would seem to benefit from having finalizers that
can execute on scope exit without wrapping pcall/etc.  I think this is
esp true when dealing with the C-side and a possible error occurs that
you don't expect, but you don't want to go through wrapping it in a
pcall (if it's something simple like a table-get that might use a
metatable) and you don't want to use up a userdata ptr with __gc to
handle cleanup on the error case.

-- 
Thomas Harning Jr.