Open
Description
Is there a way for embedders to get a callback on new_thread
or new_work
? This would be useful for for e.g. modifying _G
in the thread's lua_State
.
It seems as though #350 may already provide this, but I don't see a way to determine (in the lua_CFpcall
callback) from where the callback has been called. Perhaps this could be a new flag, e.g. LUVF_CALLBACK_NEWTHREAD
, indicating to the callback implementer that it should (if desired) perform initialization work on the provided lua_State
?