pub struct Config;
Expand description
May
Configuration type
Implementations
sourceimpl Config
impl Config
the config should be called at the program beginning
successive call would not tack effect for that the scheduler is already started
sourcepub fn set_workers(&self, workers: usize) -> &Self
pub fn set_workers(&self, workers: usize) -> &Self
set the worker thread number
the minimum worker thread is 1, if you pass 0 to it, will use internal default
sourcepub fn get_workers(&self) -> usize
pub fn get_workers(&self) -> usize
get the normal workers number
sourcepub fn set_io_workers(&self, _workers: usize) -> &Self
👎 Deprecated since 0.3.13: use set_workers
only
pub fn set_io_workers(&self, _workers: usize) -> &Self
use set_workers
only
set the io worker thread number
sourcepub fn set_pool_capacity(&self, capacity: usize) -> &Self
pub fn set_pool_capacity(&self, capacity: usize) -> &Self
set cached coroutine pool number
if you pass 0 to it, will use internal default
sourcepub fn get_pool_capacity(&self) -> usize
pub fn get_pool_capacity(&self) -> usize
get the coroutine pool capacity
sourcepub fn set_stack_size(&self, size: usize) -> &Self
pub fn set_stack_size(&self, size: usize) -> &Self
set default coroutine stack size in usize
if you pass 0 to it, will use internal default
sourcepub fn get_stack_size(&self) -> usize
pub fn get_stack_size(&self) -> usize
get the default coroutine stack size
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more