Struct parity_runtime::Runtime
source · [−]pub struct Runtime { /* private fields */ }
Expand description
Runtime for futures.
Runs in a separate thread.
Implementations
sourceimpl Runtime
impl Runtime
sourcepub fn with_default_thread_count() -> Self
pub fn with_default_thread_count() -> Self
Spawns a new tokio runtime with a default thread count on a background
thread and returns a Runtime
which can be used to spawn tasks via
its executor.
sourcepub fn with_thread_count(thread_count: usize) -> Self
pub fn with_thread_count(thread_count: usize) -> Self
Spawns a new tokio runtime with a the specified thread count on a
background thread and returns a Runtime
which can be used to spawn
tasks via its executor.
sourcepub fn raw_executor(&self) -> TaskExecutor
pub fn raw_executor(&self) -> TaskExecutor
Returns this runtime raw executor.
Deprecated: Exists only to connect with current JSONRPC implementation.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more