pub struct TokioTaskRunner;Expand description
Default runner: one tokio task per future, held in a JoinSet so that dropping the
run future aborts them. A task panic aborts the remaining tasks, waits for them to
stop, and is then re-raised on the caller.
Trait Implementations§
Source§impl TaskRunner for TokioTaskRunner
impl TaskRunner for TokioTaskRunner
Source§fn run<'life0, 'async_trait>(
&'life0 self,
tasks: Vec<BoxFuture<'static, ()>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
tasks: Vec<BoxFuture<'static, ()>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs every task and returns once all of them have completed. Dropping the returned
future cancels the tasks still running.
Auto Trait Implementations§
impl Forget for TokioTaskRunner
impl Freeze for TokioTaskRunner
impl Move for TokioTaskRunner
impl RefUnwindSafe for TokioTaskRunner
impl Send for TokioTaskRunner
impl Sync for TokioTaskRunner
impl Unpin for TokioTaskRunner
impl UnsafeUnpin for TokioTaskRunner
impl UnwindSafe for TokioTaskRunner
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