From 19d96c067410e30da29978be3513824645902a84 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Wed, 8 Nov 2023 15:11:18 -0800 Subject: [PATCH] io: increase `ScheduledIo` tick resolution (#6135) While this is no current evidence that increasing the tick resolution is necessary, since we have available bits, we might as well use them. --- tokio/src/runtime/io/scheduled_io.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/runtime/io/scheduled_io.rs b/tokio/src/runtime/io/scheduled_io.rs index 6345bcc8835..c214beff039 100644 --- a/tokio/src/runtime/io/scheduled_io.rs +++ b/tokio/src/runtime/io/scheduled_io.rs @@ -165,11 +165,11 @@ enum State { // // | shutdown | driver tick | readiness | // |----------+-------------+-----------| -// | 1 bit | 8 bits + 16 bits | +// | 1 bit | 15 bits + 16 bits | const READINESS: bit::Pack = bit::Pack::least_significant(16); -const TICK: bit::Pack = READINESS.then(8); +const TICK: bit::Pack = READINESS.then(15); const SHUTDOWN: bit::Pack = TICK.then(1);