pub struct Scheduler<const N: usize> {
queue: List<RRList, UId>,
current: Option<UId>,
current_left: u32,
quantum: u32,
}Fields§
§queue: List<RRList, UId>§current: Option<UId>§current_left: u32§quantum: u32Implementations§
Source§impl<const N: usize> Scheduler<N>
impl<const N: usize> Scheduler<N>
pub const fn new() -> Self
pub fn enqueue( &mut self, uid: UId, storage: &mut BitReclaimMap<UId, Thread, N>, ) -> Result<(), Error>
pub fn put(&mut self, uid: UId, dt: u32)
pub fn pick( &mut self, storage: &mut BitReclaimMap<UId, Thread, N>, ) -> Option<(UId, u32)>
pub fn dequeue( &mut self, uid: UId, storage: &mut BitReclaimMap<UId, Thread, N>, ) -> Result<(), Error>
Auto Trait Implementations§
impl<const N: usize> Freeze for Scheduler<N>
impl<const N: usize> RefUnwindSafe for Scheduler<N>
impl<const N: usize> Send for Scheduler<N>
impl<const N: usize> Sync for Scheduler<N>
impl<const N: usize> Unpin for Scheduler<N>
impl<const N: usize> UnwindSafe for Scheduler<N>
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