mirror of
https://github.com/neovim/neovim.git
synced 2026-10-26 15:40:20 -05:00
fix(event-loop): don't call uv_stop() when loop isn't running (#37984)
Otherwise it will cause the next uv_run() to stop immediately.
This commit is contained in:
1 parent
94c21c22dc
commit
57c6b61cf2
1 file changed
+5
-1
@@ -124,7 +124,11 @@ void loop_on_put(MultiQueue *queue, void *data)
|
||||
// of the queues, the event would only be processed after the poll
|
||||
// returns (user hits a key for example). To avoid this scenario, we call
|
||||
// uv_stop when a event is enqueued.
|
||||
uv_stop(&loop->uv);
|
||||
// Only call uv_stop() when the loop is actually running, otherwise it will
|
||||
// instead make the next uv_run() stop immediately.
|
||||
if (loop->recursive) {
|
||||
uv_stop(&loop->uv);
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(EXITFREE)
|
||||
|
||||
Reference in new issue
Block a user