Struct SchedulerConfig
pub struct SchedulerConfig {
pub steal_threshold: u32,
pub share_threshold: u32,
pub max_steal_batch: u32,
pub steal_neighborhood: u32,
pub enabled: bool,
pub strategy: SchedulingStrategy,
}Expand description
Configuration for dynamic actor scheduling.
Fields§
§steal_threshold: u32Queue depth below which the scheduler tries to steal work.
Queue depth above which the scheduler offers work to neighbors.
max_steal_batch: u32Maximum messages to steal in one operation.
steal_neighborhood: u32Number of neighbor blocks to check for work stealing.
enabled: boolEnable/disable dynamic scheduling (can be toggled at runtime).
strategy: SchedulingStrategyScheduling strategy.
Implementations§
§impl SchedulerConfig
impl SchedulerConfig
pub fn static_scheduling() -> SchedulerConfig
pub fn static_scheduling() -> SchedulerConfig
Create a static (no scheduling) configuration.
This is the current default behavior: each thread block processes its own fixed work queue. No load balancing occurs.
pub fn work_stealing(steal_threshold: u32) -> SchedulerConfig
pub fn work_stealing(steal_threshold: u32) -> SchedulerConfig
Create a work-stealing configuration with the given threshold.
When an actor’s queue depth falls below steal_threshold, its scheduler
warp will attempt to steal messages from the busiest neighbor.
pub fn round_robin() -> SchedulerConfig
pub fn round_robin() -> SchedulerConfig
Create a round-robin configuration.
Messages are distributed from a global work queue to blocks in round-robin order, using a global atomic counter for index assignment.
pub fn priority(levels: u32) -> SchedulerConfig
pub fn priority(levels: u32) -> SchedulerConfig
Create a priority-based configuration with the given number of levels.
Messages are bucketed into priority sub-queues (0 = lowest, levels-1 = highest). The scheduler warp dequeues from the highest-priority non-empty sub-queue first.
pub fn with_steal_threshold(self, threshold: u32) -> SchedulerConfig
pub fn with_steal_threshold(self, threshold: u32) -> SchedulerConfig
Set the steal threshold.
Set the share threshold.
pub fn with_max_steal_batch(self, batch: u32) -> SchedulerConfig
pub fn with_max_steal_batch(self, batch: u32) -> SchedulerConfig
Set the maximum steal batch size.
pub fn with_steal_neighborhood(self, neighborhood: u32) -> SchedulerConfig
pub fn with_steal_neighborhood(self, neighborhood: u32) -> SchedulerConfig
Set the number of neighbor blocks to check for work stealing.
pub fn with_enabled(self, enabled: bool) -> SchedulerConfig
pub fn with_enabled(self, enabled: bool) -> SchedulerConfig
Enable or disable the scheduler.
pub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Check if this configuration uses dynamic scheduling (anything other than Static).
Trait Implementations§
§impl Clone for SchedulerConfig
impl Clone for SchedulerConfig
§fn clone(&self) -> SchedulerConfig
fn clone(&self) -> SchedulerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SchedulerConfig
impl Debug for SchedulerConfig
§impl Default for SchedulerConfig
impl Default for SchedulerConfig
§fn default() -> SchedulerConfig
fn default() -> SchedulerConfig
Auto Trait Implementations§
impl Freeze for SchedulerConfig
impl RefUnwindSafe for SchedulerConfig
impl Send for SchedulerConfig
impl Sync for SchedulerConfig
impl Unpin for SchedulerConfig
impl UnwindSafe for SchedulerConfig
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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