From 9a46b9e9d772317ab095d69a5d91c61cbfc2f956 Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Fri, 20 Oct 2023 00:27:39 +0000 Subject: [PATCH] crates/sel4-async/time: Add note about timer wheel Signed-off-by: Nick Spinale --- crates/sel4-async/time/src/timer_queue.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/sel4-async/time/src/timer_queue.rs b/crates/sel4-async/time/src/timer_queue.rs index aa6478aac..0779260d0 100644 --- a/crates/sel4-async/time/src/timer_queue.rs +++ b/crates/sel4-async/time/src/timer_queue.rs @@ -3,6 +3,11 @@ use core::ops::Bound; use crate::SubKey; +// We opt for a simple B-tree-based implementation rather than implementing a timer wheel. This is +// good enough for now. Note that this approach is also good enough for `async-std`. If we ever do +// actually need the scalability of something like a timer wheel, `tokio`'s implementation would be +// a good place to start. + pub struct TimerQueue { pending: BTreeMap, V>, }