lua-users home
lua-l archive

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


One other thing I'm probably about to add: A hook to allow gc metamethods to
run in a separate thread.

This only matters in multi-threaded programs but seems to be the only
generally safe way to deal with mutexes since running them in the thread
that triggered GC means that one suffers from potentially arbitrary
re-entrancy. By running them in their own thread, we can guarantee that that
thread isn't currently holding any other mutexes.

Whether this matters for the Lua 5.1 GC will depend on how that GC works,
but it's an issue worth considering when building in multi-threading
support.

Mark