struct RtPrioQueue {
list: LinkedList<RtTaskAdapter>,
len: usize,
}Expand description
Single-priority FIFO backed by an intrusive doubly-linked list.
Fields§
§list: LinkedList<RtTaskAdapter>§len: usizeImplementations§
Source§impl RtPrioQueue
impl RtPrioQueue
fn new() -> Self
fn push_back(&mut self, task: Arc<Task>)
fn pop_front(&mut self) -> Option<Arc<Task>>
fn is_empty(&self) -> bool
Sourcefn remove_by_id(&mut self, task_id: TaskId) -> bool
fn remove_by_id(&mut self, task_id: TaskId) -> bool
Remove the first task with task_id. Returns true when found.
O(n) scan, but no allocation. In practice each priority queue is short (a handful of RT threads), so the scan terminates quickly.
Auto Trait Implementations§
impl !RefUnwindSafe for RtPrioQueue
impl !UnwindSafe for RtPrioQueue
impl Freeze for RtPrioQueue
impl Send for RtPrioQueue
impl Sync for RtPrioQueue
impl Unpin for RtPrioQueue
impl UnsafeUnpin for RtPrioQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more