win,signal: fix data race dispatching SIGWINCH (#4488)
The Event should be reset before reading the value, or libuv might miss an update that occurred too rapidly after the previously one. Refs: https://github.com/libuv/libuv/pull/2381 Refs: https://github.com/libuv/libuv/discussions/4485
This commit is contained in:
parent
727ee7237e
commit
a6a987c0de
@ -2380,8 +2380,8 @@ static DWORD WINAPI uv__tty_console_resize_watcher_thread(void* param) {
|
||||
/* Make sure to not overwhelm the system with resize events */
|
||||
Sleep(33);
|
||||
WaitForSingleObject(uv__tty_console_resized, INFINITE);
|
||||
uv__tty_console_signal_resize();
|
||||
ResetEvent(uv__tty_console_resized);
|
||||
uv__tty_console_signal_resize();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user