| ... | ... | @@ -8229,7 +8229,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8229 | 8229 | |
| 8230 | 8230 | var io_status_block: windows.IO_STATUS_BLOCK = undefined; |
| 8231 | 8231 | var done: bool = false; |
| 8232 | | const infinite: windows.LARGE_INTEGER = windows.INFINITE; |
| 8232 | const max_delay_interval: windows.LARGE_INTEGER = std.math.minInt(i64); |
| 8233 | 8233 | |
| 8234 | 8234 | read: { |
| 8235 | 8235 | const syscall: Syscall = try .start(); |
| ... | ... | @@ -8261,7 +8261,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8261 | 8261 | // Once we get here we received PENDING so we must not return from the |
| 8262 | 8262 | // function until the operation completes. |
| 8263 | 8263 | defer while (!done) { |
| 8264 | | _ = windows.ntdll.NtDelayExecution(1, &infinite); |
| 8264 | _ = windows.ntdll.NtDelayExecution(1, &max_delay_interval); |
| 8265 | 8265 | }; |
| 8266 | 8266 | |
| 8267 | 8267 | const alertable_syscall = syscall.toAlertable() catch |err| switch (err) { |
| ... | ... | @@ -8272,7 +8272,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8272 | 8272 | }; |
| 8273 | 8273 | defer alertable_syscall.finish(); |
| 8274 | 8274 | while (!done) { |
| 8275 | | _ = windows.ntdll.NtDelayExecution(1, &infinite); |
| 8275 | _ = windows.ntdll.NtDelayExecution(1, &max_delay_interval); |
| 8276 | 8276 | alertable_syscall.checkCancel() catch |err| switch (err) { |
| 8277 | 8277 | error.Canceled => |e| { |
| 8278 | 8278 | _ = windows.ntdll.NtCancelIoFile(file.handle, &io_status_block); |