Skip to main content

ResultWaitPolicy

Trait ResultWaitPolicy 

Source
pub trait ResultWaitPolicy: Sealed {
    const SPIN_ATTEMPTS: usize;
}
Expand description

Compile-time wait policy for task result handoff.

Implementors are zero-sized marker types. TaskResultSlot receives the policy as a generic parameter, so the spin budget is const-folded and no runtime policy value is stored in the handle or slot.

Required Associated Constants§

Source

const SPIN_ATTEMPTS: usize

Maximum number of spin-loop iterations before parking the thread.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ResultWaitPolicy for BlockingResultWait

Source§

const SPIN_ATTEMPTS: usize = super::super::MAX_SPIN_ATTEMPTS