You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Also, just to note: I'd be happy to put together a PR for this if it seems like a desirable feature and a reasonable approach. I can also give more details on the motivation for the feature.
Bumping this, Saw this issue earlier after some confusion about asynchronous code in neovim. It would be nice to have proper multithreading for those few tasks that really benefit from it
Is there a way for embedders to get a callback on
new_thread
ornew_work
? This would be useful for for e.g. modifying_G
in the thread'slua_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 providedlua_State
?The text was updated successfully, but these errors were encountered: