Check for interrupts more eagerly on Windows

This commit is contained in:
Justine Tunney 2023-07-24 02:03:29 -07:00
parent 94ea34367a
commit eb84a25994
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -50,6 +50,10 @@ textwindows int __wsablock(struct Fd *fd, struct NtOverlapped *overlapped,
_unassert(CancelIoEx(fd->handle, overlapped) ||
WSAGetLastError() == kNtErrorNotFound);
errno = e;
} else {
if (_check_interrupts(restartable, g_fds.p)) {
return -1;
}
}
for (;;) {
i = WSAWaitForMultipleEvents(1, &overlapped->hEvent, true,