pub enum AeronIdleStrategyKind {
Sleeping,
Yielding,
BusySpin,
NoOp,
Backoff,
}Expand description
Aeron’s named idle strategies, as accepted by the context / media-driver
set_*_idle_strategy options (the C aeron_idle_strategy_load symbol table).
Strategy parameters are configured separately via set_idle_strategy_init_args:
Sleeping: sleep period in nanoseconds (e.g."1000000"= 1ms)Backoff:maxSpins-maxYields-minParkNs-maxParkNs(e.g."10-20-1000-1000000")- Others: init args ignored
Variants§
Sleeping
Sleep when idle ("sleeping"); period from the init args.
Yielding
Yield the OS thread when idle ("yield").
BusySpin
Busy-spin ("spin") — lowest latency, pins a core.
NoOp
Never back off ("noop").
Backoff
Spin, then yield, then park with exponential backoff ("backoff") — the default.
Implementations§
Source§impl AeronIdleStrategyKind
impl AeronIdleStrategyKind
Sourcepub const fn default_init_args(&self) -> &'static str
pub const fn default_init_args(&self) -> &'static str
Default init args accepted by this strategy’s loader (the C client validates the
currently-set init args when the strategy is set, so they must be coherent):
sleeping takes a period in ns; backoff takes maxSpins-maxYields-minParkNs-maxParkNs
(hyphen-separated); the rest ignore init args.
Sourcepub const fn default_init_args_c(&self) -> &'static CStr
pub const fn default_init_args_c(&self) -> &'static CStr
Self::default_init_args as a compile-time C string (no runtime allocation).
Trait Implementations§
Source§impl Clone for AeronIdleStrategyKind
impl Clone for AeronIdleStrategyKind
Source§fn clone(&self) -> AeronIdleStrategyKind
fn clone(&self) -> AeronIdleStrategyKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more