pub struct Runtime { /* private fields */ }
Implementations§
source§impl Runtime
impl Runtime
pub fn start() -> Result<Runtime, Error>
sourcepub fn add_process(
&self,
process: Box<dyn Process>
) -> Result<ProcessHandle, Error>
pub fn add_process( &self, process: Box<dyn Process> ) -> Result<ProcessHandle, Error>
Adds a new process to the runtime.
Returns a ProcessHandle that can be used to wake up and shut down the process.
NB This call depends on the runtime process waking up and responding to us. While this should generally not be a possibility, it is important that no calls to any of your Process::wakeup methods will be waiting on a lock that is held when calling this method.
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§
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