pub struct AsyncExecutor { /* private fields */ }Expand description
Native async executor with access to the PAL I/O reactor.
Implementations§
Source§impl AsyncExecutor
impl AsyncExecutor
Sourcepub fn spawn<F, T>(&self, future: F) -> AsyncHandle<T> ⓘ
pub fn spawn<F, T>(&self, future: F) -> AsyncHandle<T> ⓘ
Spawn an async task with default priority.
Sourcepub fn spawn_with_priority<F, T>(
&self,
future: F,
priority: Priority,
) -> AsyncHandle<T> ⓘ
pub fn spawn_with_priority<F, T>( &self, future: F, priority: Priority, ) -> AsyncHandle<T> ⓘ
Spawn an async task with specified priority.
Sourcepub fn run(&self) -> Result<()>
pub fn run(&self) -> Result<()>
Run the native async executor and poll the PAL reactor between task passes.
Sourcepub fn stats(&self) -> ExecutorStats
pub fn stats(&self) -> ExecutorStats
Get current executor statistics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AsyncExecutor
impl !RefUnwindSafe for AsyncExecutor
impl !UnwindSafe for AsyncExecutor
impl Send for AsyncExecutor
impl Sync for AsyncExecutor
impl Unpin for AsyncExecutor
impl UnsafeUnpin for AsyncExecutor
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