Struct async_spin_sleep::Builder
source · pub struct Builder {
pub schedule_resolution: Duration,
pub collect_garbage_at: usize,
pub channel_capacity: Option<usize>,
/* private fields */
}Fields§
§schedule_resolution: DurationDefault scheduling resolution for this driver. Setting this to a lower value may decrease CPU usage of the driver, but may also dangerously increase the chance of missing a wakeup event due to the OS scheduler.
collect_garbage_at: usizeAborted nodes that are too far from execution may remain in the driver’s memory for a long time. This value specifies the maximum number of aborted nodes that can be stored in the driver’s memory. If this value is exceeded, the driver will collect garbage.
channel_capacity: Option<usize>Set channel capacity. This value is used to initialize the channel that connects the driver and its handles. If the channel is full, the driver will block until the channel is available.
When None is specified, an unbounded channel will be used.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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