pub struct Executor { /* private fields */ }Expand description
The async runtime executor.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn with_config(config: ExecutorConfig) -> Self
pub fn with_config(config: ExecutorConfig) -> Self
Create with custom configuration.
Sourcepub fn spawn_child(&self, parent_id: TaskId, priority: u32) -> Option<TaskId>
pub fn spawn_child(&self, parent_id: TaskId, priority: u32) -> Option<TaskId>
Spawn a task with a parent (structured concurrency).
Sourcepub fn is_complete(&self, task_id: TaskId) -> bool
pub fn is_complete(&self, task_id: TaskId) -> bool
Check if a task is complete.
Sourcepub fn stats(&self) -> ExecutorStats
pub fn stats(&self) -> ExecutorStats
Get executor statistics.
Sourcepub fn inner(&self) -> &Arc<ExecutorInner> ⓘ
pub fn inner(&self) -> &Arc<ExecutorInner> ⓘ
Get the inner executor state.
Trait Implementations§
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