Skip to content

Commit

Permalink
crates/sel4-async/time: Add note about timer wheel
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Oct 20, 2023
1 parent 181a9e7 commit a2765d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/sel4-async/time/src/timer_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, U, V> {
pending: BTreeMap<Key<T, U>, V>,
}
Expand Down

0 comments on commit a2765d4

Please sign in to comment.