mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
loop_close: Avoid infinite loop, and log it.
Avoids a hang, and also helps diagnose issues like: https://github.com/neovim/neovim/pull/6594#issuecomment-298321826
This commit is contained in:
@@ -153,10 +153,11 @@ void event_init(void)
|
||||
terminal_init();
|
||||
}
|
||||
|
||||
void event_teardown(void)
|
||||
/// @returns false if main_loop could not be closed gracefully
|
||||
bool event_teardown(void)
|
||||
{
|
||||
if (!main_loop.events) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
multiqueue_process_events(main_loop.events);
|
||||
@@ -168,7 +169,7 @@ void event_teardown(void)
|
||||
signal_teardown();
|
||||
terminal_teardown();
|
||||
|
||||
loop_close(&main_loop, true);
|
||||
return loop_close(&main_loop, true);
|
||||
}
|
||||
|
||||
/// Performs early initialization.
|
||||
|
Reference in New Issue
Block a user