pub struct JoinSet<T> { /* private fields */ }Expand description
Tokio-free task set. See module docs for the execution model.
Implementations§
Source§impl<T: Send + 'static> JoinSet<T>
impl<T: Send + 'static> JoinSet<T>
Sourcepub fn spawn<F>(&mut self, future: F) -> AbortHandle
pub fn spawn<F>(&mut self, future: F) -> AbortHandle
Spawn future onto its own OS thread. Requires T: Send + 'static and future: Send + 'static — same bound as tokio’s
JoinSet::spawn.
Sourcepub async fn join_next(&mut self) -> Option<Result<T, JoinError>>
pub async fn join_next(&mut self) -> Option<Result<T, JoinError>>
Await the next task to complete. Returns None once every
spawned task has been reaped.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Sync for JoinSet<T>
impl<T> Freeze for JoinSet<T>
impl<T> RefUnwindSafe for JoinSet<T>
impl<T> Send for JoinSet<T>
impl<T> Unpin for JoinSet<T>
impl<T> UnsafeUnpin for JoinSet<T>
impl<T> UnwindSafe for JoinSet<T>
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