pub struct QueueingScheduler { /* private fields */ }Expand description
Queueing theory scheduler with fair SRPT.
Implementations§
Source§impl QueueingScheduler
impl QueueingScheduler
Sourcepub fn new(config: SchedulerConfig) -> Self
pub fn new(config: SchedulerConfig) -> Self
Create a new scheduler with given configuration.
Sourcepub fn submit(&mut self, weight: f64, estimated_time: f64) -> Option<u64>
pub fn submit(&mut self, weight: f64, estimated_time: f64) -> Option<u64>
Submit a new job to the scheduler.
Returns the job ID if accepted, None if rejected (queue full).
Sourcepub fn submit_named(
&mut self,
weight: f64,
estimated_time: f64,
name: Option<impl Into<String>>,
) -> Option<u64>
pub fn submit_named( &mut self, weight: f64, estimated_time: f64, name: Option<impl Into<String>>, ) -> Option<u64>
Submit a named job.
Sourcepub fn submit_with_sources(
&mut self,
weight: f64,
estimated_time: f64,
weight_source: WeightSource,
estimate_source: EstimateSource,
name: Option<impl Into<String>>,
) -> Option<u64>
pub fn submit_with_sources( &mut self, weight: f64, estimated_time: f64, weight_source: WeightSource, estimate_source: EstimateSource, name: Option<impl Into<String>>, ) -> Option<u64>
Submit a job with explicit estimate/weight sources for evidence logging.
Sourcepub fn tick(&mut self, delta_time: f64) -> Vec<u64>
pub fn tick(&mut self, delta_time: f64) -> Vec<u64>
Advance time by the given amount and process jobs.
Returns a list of completed job IDs.
Sourcepub fn evidence(&self) -> SchedulingEvidence
pub fn evidence(&self) -> SchedulingEvidence
Get scheduling evidence for the current state.
Sourcepub fn stats(&self) -> SchedulerStats
pub fn stats(&self) -> SchedulerStats
Get current statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueueingScheduler
impl RefUnwindSafe for QueueingScheduler
impl Send for QueueingScheduler
impl Sync for QueueingScheduler
impl Unpin for QueueingScheduler
impl UnsafeUnpin for QueueingScheduler
impl UnwindSafe for QueueingScheduler
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