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