From 8ea2d5b6589b8f6164a988ea1431f1b04270f3ea Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Fri, 28 Jun 2024 11:51:27 +0900 Subject: [PATCH] aio: clarify self.ops difference in fallback In io_uring, we have to keep track of the pending operations that have not yet been completed, but in Fallback that's not the case. --- src/aio/Fallback.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aio/Fallback.zig b/src/aio/Fallback.zig index 78cc231..190ba12 100644 --- a/src/aio/Fallback.zig +++ b/src/aio/Fallback.zig @@ -324,6 +324,7 @@ fn start(self: *@This(), id: u16) !void { } fn submit(self: *@This()) !bool { + // unlike io_uring, this is not only submitted ops, but also pending ops if (self.ops.empty()) return false; defer self.prev_id = null; self.pfd.add(.{ .fd = self.source.fd, .events = std.posix.POLL.IN, .revents = 0 }) catch unreachable;