authorgravatar for bblack@wikimedia.orgBrandon Black <bblack@wikimedia.org> 2026-05-11 07:34:52-05:00
committergravatar for bblack@wikimedia.orgBrandon Black <bblack@wikimedia.org> 2026-08-07 17:50:25-05:00
log47825d7de3b9b26ab1dd7bca669b693bca2995e8
tree27ed212241beb40e499f3229d147d0daa1287536
parent1182f06c1487149282f699d6265e7ef91e8a56ad

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)

1 files changed, 1 insertions(+), 0 deletions(-)

lib/std/Io.zig+1
......@@ -466,6 +466,7 @@ pub const OperateTimeoutError = Cancelable || Timeout.Error || ConcurrentError;
466466
467467/// Performs one `Operation` with provided `timeout`.
468468pub fn operateTimeout(io: Io, operation: Operation, timeout: Timeout) OperateTimeoutError!Operation.Result {
469 if (timeout == .none) return io.vtable.operate(io.userdata, operation);
469470 var storage: [1]Operation.Storage = undefined;
470471 var batch: Batch = .init(&storage);
471472 batch.addAt(0, operation);