pub struct GlobalExecutorConfig { /* private fields */ }Expand description
How the process default runtime is set up by init_with_config.
Implementations§
Source§impl GlobalExecutorConfig
impl GlobalExecutorConfig
Sourcepub fn with_env_var(self, env_var: &'static str) -> Self
pub fn with_env_var(self, env_var: &'static str) -> Self
Reads the number of workers to start from the environment variable
env_var, before with_min_threads.
Sourcepub fn with_min_threads(self, min_threads: usize) -> Self
pub fn with_min_threads(self, min_threads: usize) -> Self
Starts this many workers (default: one per core), the fewest
stop_thread leaves running.
Sourcepub fn with_max_threads(self, max_threads: usize) -> Self
pub fn with_max_threads(self, max_threads: usize) -> Self
The most workers the runtime may run, spawn_more_threads
included (default: four times the minimum). Zero runs every task on
the thread inside block_on, with no worker at all.
Trait Implementations§
Source§impl Debug for GlobalExecutorConfig
impl Debug for GlobalExecutorConfig
Source§impl Default for GlobalExecutorConfig
impl Default for GlobalExecutorConfig
Source§fn default() -> GlobalExecutorConfig
fn default() -> GlobalExecutorConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GlobalExecutorConfig
impl !UnwindSafe for GlobalExecutorConfig
impl Freeze for GlobalExecutorConfig
impl Send for GlobalExecutorConfig
impl Sync for GlobalExecutorConfig
impl Unpin for GlobalExecutorConfig
impl UnsafeUnpin for GlobalExecutorConfig
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