pub struct ThreadDriverBackend { /* private fields */ }Expand description
A backend for VmTaskDriverSource based on
individual threads.
If no target VP is specified, this backend will spawn tasks and IO a default single-threaded IO driver. If a target VP is specified, the backend will spawn a separate thread and spawn tasks and IOs there.
Implementations§
Trait Implementations§
Source§impl BuildVmTaskDriver for ThreadDriverBackend
impl BuildVmTaskDriver for ThreadDriverBackend
Source§type Driver = ThreadDriver
type Driver = ThreadDriver
The associated driver type.
Source§type CurrentDriver = CurrentThreadDriver
type CurrentDriver = CurrentThreadDriver
The driver type for
build_current.Source§fn build(
&self,
name: String,
target_vp: Option<u32>,
_run_on_target: bool,
) -> Self::Driver
fn build( &self, name: String, target_vp: Option<u32>, _run_on_target: bool, ) -> Self::Driver
Builds a new driver that can drive IO and spawn tasks.
Source§fn build_current(&self) -> Self::CurrentDriver
fn build_current(&self) -> Self::CurrentDriver
Builds a driver that dispatches to the current thread’s executor.
Auto Trait Implementations§
impl Freeze for ThreadDriverBackend
impl !RefUnwindSafe for ThreadDriverBackend
impl Send for ThreadDriverBackend
impl Sync for ThreadDriverBackend
impl Unpin for ThreadDriverBackend
impl UnsafeUnpin for ThreadDriverBackend
impl !UnwindSafe for ThreadDriverBackend
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