mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
loop_close: timout after 2 seconds #11821
never UV_RUN_DEFAULT ref #11820 ref #7376
This commit is contained in:
parent
2645669c89
commit
284b398eb9
@ -127,8 +127,8 @@ bool loop_close(Loop *loop, bool wait)
|
||||
uv_close((uv_handle_t *)&loop->async, NULL);
|
||||
uint64_t start = wait ? os_hrtime() : 0;
|
||||
while (true) {
|
||||
uv_run(&loop->uv, wait ? UV_RUN_DEFAULT : UV_RUN_NOWAIT);
|
||||
if (!uv_loop_close(&loop->uv) || !wait) {
|
||||
uv_run(&loop->uv, UV_RUN_NOWAIT);
|
||||
if (!wait || (uv_loop_close(&loop->uv) != UV_EBUSY)) {
|
||||
break;
|
||||
}
|
||||
if (os_hrtime() - start >= 2 * 1000000000) {
|
||||
|
Loading…
Reference in New Issue
Block a user