pub struct RuntimeConfig {
pub workers: usize,
pub quantum: u32,
}Expand description
Tunables for Runtime::new. Everything has a sensible default via
RuntimeConfig::default so the common case is Runtime::new(chunk).
Fields§
§workers: usizeNumber of worker OS threads. Defaults to the number of logical CPUs — one worker per core is the right starting point for a CPU-bound M:N scheduler; embedders running alongside other CPU-heavy work on the same machine may want fewer.
quantum: u32Instructions a flow runs before being preempted back to the
scheduler even if it never hits Yield.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuntimeConfig
impl Debug for RuntimeConfig
Auto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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