pub struct SchedulerConfig {
pub max_concurrency: usize,
pub max_retries: i32,
pub preempt_priority: Priority,
pub poll_interval: Duration,
pub throughput_sample_size: i32,
pub shutdown_mode: ShutdownMode,
}Expand description
Scheduler configuration.
Fields§
§max_concurrency: usizeMaximum concurrent running tasks. Adjusted dynamically via
Scheduler::set_max_concurrency.
max_retries: i32Maximum retries before permanent failure. Default: 3.
preempt_priority: PriorityPriority threshold: tasks at or above this priority (lower numeric value) trigger preemption of lower-priority running tasks.
poll_interval: DurationInterval between scheduler polls when idle. Default: 500ms.
throughput_sample_size: i32How many recent tasks to consider for IO throughput estimation.
shutdown_mode: ShutdownModeShutdown behavior. Default: Hard.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchedulerConfig
impl RefUnwindSafe for SchedulerConfig
impl Send for SchedulerConfig
impl Sync for SchedulerConfig
impl Unpin for SchedulerConfig
impl UnsafeUnpin for SchedulerConfig
impl UnwindSafe for SchedulerConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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