Trait web_thread::web::JoinHandleExt
source · pub trait JoinHandleExt<T> {
// Required method
fn join_async(&mut self) -> JoinHandleFuture<'_, T> ⓘ;
}
Available on
Web
only.Expand description
Web-specific extension for web_thread::JoinHandle
.
Required Methods§
sourcefn join_async(&mut self) -> JoinHandleFuture<'_, T> ⓘ
fn join_async(&mut self) -> JoinHandleFuture<'_, T> ⓘ
Async version of JoinHandle::join()
.
§Panics
- If called on the thread to join.
- If it was already polled to completion by another call to
JoinHandleExt::join_async()
.
§Example
use web_thread::web::JoinHandleExt;
web_thread::spawn(|| ()).join_async().await.unwrap();