mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
event: Reintroduce the immediate event queue
Commit @264e0d872c("Remove automatic event deferral") removed the immediate event queue because event deferral now had to be explicit. The problem is that while some events don't need to be deferred, they still can result in recursive `event_poll` calls, and recursion is not supported by libuv. Examples of those are msgpack-rpc requests while a server->client request is pending, or signals which can call `mch_exit`(and that will result in `uv_run` calls). To fix the problem, this reintroduces the immediate event queue for events that can potentially result in event loop recursion. The non-deferred events are still processed in `event_poll`, but only after `uv_run` returns.
This commit is contained in:
@@ -19541,7 +19541,7 @@ char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, char_u *flags)
|
||||
event_push((Event) { \
|
||||
.handler = on_job_event, \
|
||||
.data = event_data \
|
||||
}); \
|
||||
}, true); \
|
||||
} while(0)
|
||||
|
||||
static void on_job_stdout(RStream *rstream, void *data, bool eof)
|
||||
|
Reference in New Issue
Block a user