From 47825d7de3b9b26ab1dd7bca669b693bca2995e8 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Mon, 11 May 2026 07:34:52 -0500 Subject: [PATCH] Io.operateTimeout: if timeout == .none, operate It's far simpler for the same effective outcome (no Batch instantiation, no quick-success attempt + infinite poll first) --- lib/std/Io.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 269372f12ec3a2ebc4f5dae810be15736b7dd5d4..758768634394597d57c2636ee80d62d73ee2ef38 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -466,6 +466,7 @@ pub const OperateTimeoutError = Cancelable || Timeout.Error || ConcurrentError; /// Performs one `Operation` with provided `timeout`. pub fn operateTimeout(io: Io, operation: Operation, timeout: Timeout) OperateTimeoutError!Operation.Result { + if (timeout == .none) return io.vtable.operate(io.userdata, operation); var storage: [1]Operation.Storage = undefined; var batch: Batch = .init(&storage); batch.addAt(0, operation); -- 2.54.0