pub struct ImmediateDrainConfig {
pub max_zero_timeout_polls_per_burst: usize,
pub max_burst_duration: Duration,
pub backoff_timeout: Duration,
}Expand description
Immediate event-drain policy for the runtime main loop.
When a poll reports readiness, the runtime drains events by repeatedly
checking poll_event(Duration::ZERO) to avoid latency between buffered
inputs. This policy bounds that immediate-drain path so bursty workloads do
not devolve into zero-timeout spin storms.
Fields§
§max_zero_timeout_polls_per_burst: usizeMaximum consecutive zero-timeout polls allowed in a single burst window.
max_burst_duration: DurationMaximum wall-clock time spent in a single immediate-drain burst window.
backoff_timeout: DurationNon-zero poll timeout used when the burst window budget is exhausted.
Trait Implementations§
Source§impl Clone for ImmediateDrainConfig
impl Clone for ImmediateDrainConfig
Source§fn clone(&self) -> ImmediateDrainConfig
fn clone(&self) -> ImmediateDrainConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImmediateDrainConfig
impl Debug for ImmediateDrainConfig
Auto Trait Implementations§
impl Freeze for ImmediateDrainConfig
impl RefUnwindSafe for ImmediateDrainConfig
impl Send for ImmediateDrainConfig
impl Sync for ImmediateDrainConfig
impl Unpin for ImmediateDrainConfig
impl UnsafeUnpin for ImmediateDrainConfig
impl UnwindSafe for ImmediateDrainConfig
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