-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
track issues in neovim related with luv #663
Comments
This mainly because of default behavior of luv will exit when error occurs in callback. Lines 707 to 724 in bc01ad8
There are three opportunity or choice to handle this kind things. 1. The
|
/* Set or clear an external c routine for luv event callback | |
When using a custom/external function, this must be called before luaopen_luv | |
(otherwise luv will use the default callback function: luv_cfpcall) | |
*/ | |
LUALIB_API void luv_set_callback(lua_State* L, luv_CFpcall pcall); | |
/* Set or clear an external c routine for luv thread When using | |
* a custom/external function, this must be called before luaopen_luv | |
* in the function that create the lua_State of the thread | |
(otherwise luv will use the default callback function: luv_cfpcall) | |
*/ | |
LUALIB_API void luv_set_thread(lua_State* L, luv_CFpcall pcall); | |
/* Set or clear an external c routine for luv c thread When using | |
* a custom/external function, this must be called before luaopen_luv | |
* in the function that create the lua_State of the thread | |
(otherwise luv will use the default callback function: luv_cfcpcall) | |
*/ |
luv flags to control luv_CFpcall routine.
https://github.com/luvit/luv/blob/master/src/luv.h#L65-L93
3. luv
set default flag with LUVF_CALLBACK_NOEXIT
to avoid exit, continue to run but real errors
This is simplest way, but when luv
use as a network server live long time, this maybe hide some applications errors. I hope receive more recommendations about whether to enable this.
Let's try change default LUVF_CALLBACK_FLAGS to LUVF_CALLBACK_NOEXIT.
This just runs into #433 again, see #433 (comment) for the problem with it. |
Note also that neovim does not use the default |
I almost forget that. |
The text was updated successfully, but these errors were encountered: