pub struct NoStealRuntime { /* private fields */ }
Expand description
Multi-threaded runtime backed by a pool of single threaded tokio runtime
Implementations§
Source§impl NoStealRuntime
impl NoStealRuntime
Sourcepub fn new(threads: usize, name: &str) -> Self
pub fn new(threads: usize, name: &str) -> Self
Create a new NoStealRuntime. Panic if threads
is 0
Sourcepub fn get_runtime(&self) -> &Handle
pub fn get_runtime(&self) -> &Handle
Return the &Handle of a random thread of this runtime
Sourcepub fn get_runtime_at(&self, index: usize) -> &Handle
pub fn get_runtime_at(&self, index: usize) -> &Handle
Return the &Handle of a given thread of this runtime
Sourcepub fn shutdown_timeout(self, timeout: Duration)
pub fn shutdown_timeout(self, timeout: Duration)
Call tokio’s shutdown_timeout
of all the runtimes. This function is blocking until
all runtimes exit.
Auto Trait Implementations§
impl !Freeze for NoStealRuntime
impl !RefUnwindSafe for NoStealRuntime
impl Send for NoStealRuntime
impl Sync for NoStealRuntime
impl Unpin for NoStealRuntime
impl !UnwindSafe for NoStealRuntime
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