| ... | ... | @@ -8372,7 +8372,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8372 | 8372 | |
| 8373 | 8373 | var io_status_block: windows.IO_STATUS_BLOCK = undefined; |
| 8374 | 8374 | var done: bool = false; |
| 8375 | | const infinite: windows.LARGE_INTEGER = windows.INFINITE; |
| 8375 | const max_delay_interval: windows.LARGE_INTEGER = std.math.minInt(i64); |
| 8376 | 8376 | |
| 8377 | 8377 | read: { |
| 8378 | 8378 | const syscall: Syscall = try .start(); |
| ... | ... | @@ -8404,7 +8404,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8404 | 8404 | // Once we get here we received PENDING so we must not return from the |
| 8405 | 8405 | // function until the operation completes. |
| 8406 | 8406 | defer while (!done) { |
| 8407 | | _ = windows.ntdll.NtDelayExecution(1, &infinite); |
| 8407 | _ = windows.ntdll.NtDelayExecution(1, &max_delay_interval); |
| 8408 | 8408 | }; |
| 8409 | 8409 | |
| 8410 | 8410 | const alertable_syscall = syscall.toAlertable() catch |err| switch (err) { |
| ... | ... | @@ -8415,7 +8415,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8415 | 8415 | }; |
| 8416 | 8416 | defer alertable_syscall.finish(); |
| 8417 | 8417 | while (!done) { |
| 8418 | | _ = windows.ntdll.NtDelayExecution(1, &infinite); |
| 8418 | _ = windows.ntdll.NtDelayExecution(1, &max_delay_interval); |
| 8419 | 8419 | alertable_syscall.checkCancel() catch |err| switch (err) { |
| 8420 | 8420 | error.Canceled => |e| { |
| 8421 | 8421 | _ = windows.ntdll.NtCancelIoFile(file.handle, &io_status_block); |