pub struct VmTaskDriverBuilder<'a> { /* private fields */ }
Expand description
A builder returned by VmTaskDriverSource::builder
.
Implementations§
Source§impl VmTaskDriverBuilder<'_>
impl VmTaskDriverBuilder<'_>
Sourcepub fn run_on_target(&mut self, run_on_target: bool) -> &mut Self
pub fn run_on_target(&mut self, run_on_target: bool) -> &mut Self
A hint to the backend specifies whether the driver should spawned tasks that always on a thread handling the target VP.
If false
(the default), then when spawned tasks are awoken, they may
run on any executor (such as the current one). If true
, the backend
will run them on the same thread that would drive async IO.
Some devices will want to override the default to reduce jitter or ensure that IO is issued from the correct processor.
Sourcepub fn target_vp(&mut self, target_vp: u32) -> &mut Self
pub fn target_vp(&mut self, target_vp: u32) -> &mut Self
A hint to the backend specifying the guest VP associated with spawned tasks and IO.
Backends can use this to ensure that spawned tasks and async IO will run near or on the target VP.
Sourcepub fn build(&self, name: impl Into<String>) -> VmTaskDriver
pub fn build(&self, name: impl Into<String>) -> VmTaskDriver
Builds a VM task driver.
name
is used by some backends to identify a spawned thread. It is
ignored by other backends.