| ... | @@ -2677,6 +2677,8 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa | ... | @@ -2677,6 +2677,8 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2677 | b.user.complete_tail = complete_tail; | 2677 | b.user.complete_tail = complete_tail; |
| 2678 | } | 2678 | } |
| 2679 | | 2679 | |
| | 2680 | var any_done = false; |
| | 2681 | |
| 2680 | while (submit_head != submit_tail) : (submit_head = submit_head.next(len)) { | 2682 | while (submit_head != submit_tail) : (submit_head = submit_head.next(len)) { |
| 2681 | const op = ring[submit_head.index(len)]; | 2683 | const op = ring[submit_head.index(len)]; |
| 2682 | const operation = &operations[op]; | 2684 | const operation = &operations[op]; |
| ... | @@ -2686,6 +2688,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa | ... | @@ -2686,6 +2688,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2686 | .noop => |*o| { | 2688 | .noop => |*o| { |
| 2687 | _ = o.status.unstarted; | 2689 | _ = o.status.unstarted; |
| 2688 | o.status = .{ .result = {} }; | 2690 | o.status = .{ .result = {} }; |
| | 2691 | any_done = true; |
| 2689 | submitComplete(ring, &complete_tail, op); | 2692 | submitComplete(ring, &complete_tail, op); |
| 2690 | }, | 2693 | }, |
| 2691 | .file_read_streaming => |*o| { | 2694 | .file_read_streaming => |*o| { |
| ... | @@ -2693,6 +2696,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa | ... | @@ -2693,6 +2696,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2693 | switch (try ntReadFile(o.file.handle, o.data, &metadata.iosb)) { | 2696 | switch (try ntReadFile(o.file.handle, o.data, &metadata.iosb)) { |
| 2694 | .status => { | 2697 | .status => { |
| 2695 | o.status = .{ .result = ntReadFileResult(&metadata.iosb) }; | 2698 | o.status = .{ .result = ntReadFileResult(&metadata.iosb) }; |
| | 2699 | any_done = true; |
| 2696 | submitComplete(ring, &complete_tail, op); | 2700 | submitComplete(ring, &complete_tail, op); |
| 2697 | }, | 2701 | }, |
| 2698 | .pending => { | 2702 | .pending => { |
| ... | @@ -2707,7 +2711,6 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa | ... | @@ -2707,7 +2711,6 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2707 | var delay_interval: windows.LARGE_INTEGER = timeoutToWindowsInterval(timeout); | 2711 | var delay_interval: windows.LARGE_INTEGER = timeoutToWindowsInterval(timeout); |
| 2708 | | 2712 | |
| 2709 | while (true) { | 2713 | while (true) { |
| 2710 | var any_done = false; | | |
| 2711 | var any_pending = false; | 2714 | var any_pending = false; |
| 2712 | for (metadatas, 0..) |*metadata, op_usize| { | 2715 | for (metadatas, 0..) |*metadata, op_usize| { |
| 2713 | if (!metadata.pending) continue; | 2716 | if (!metadata.pending) continue; |