pub struct Executor { /* private fields */ }Expand description
Executor for asynchronous tasks
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn new(threads: usize, monitor_port: Option<u16>) -> Self
pub fn new(threads: usize, monitor_port: Option<u16>) -> Self
Creates a new Executor with a number of threads
Sourcepub fn spawn_with_name<T: Into<Task>, S: Into<String>>(&self, task: T, _name: S)
pub fn spawn_with_name<T: Into<Task>, S: Into<String>>(&self, task: T, _name: S)
Start a task on an executor thread, specifying its name for the monitor
pub fn join_arc(this: Arc<Self>) -> Result<()>
Auto Trait Implementations§
impl !Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl !UnwindSafe for Executor
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