Struct web_thread::ScopedJoinHandle
source · pub struct ScopedJoinHandle<'scope, T> { /* private fields */ }
Expand description
Implementations§
source§impl<'scope, T> ScopedJoinHandle<'scope, T>
impl<'scope, T> ScopedJoinHandle<'scope, T>
sourcepub fn join(self) -> Result<T>
pub fn join(self) -> Result<T>
See std::thread::ScopedJoinHandle::join()
.
§Notes
When compiling with panic = "abort"
, which is the only option
without enabling the Wasm exception-handling proposal, this can never
return Err
.
§Panics
- If the calling thread doesn’t support blocking, see
web::has_block_support()
. Though it is guaranteed to not block ifScopedJoinHandle::is_finished()
returnstrue
. Alternatively consider usingweb::ScopedJoinHandleExt::join_async()
. - If called on the thread to join.
- If it was already polled to completion through
web::ScopedJoinHandleExt::join_async()
.
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
See std::thread::ScopedJoinHandle::is_finished()
.
§Notes
When this returns true
it guarantees ScopedJoinHandle::join()
not to block.
Trait Implementations§
source§impl<T> Debug for ScopedJoinHandle<'_, T>
impl<T> Debug for ScopedJoinHandle<'_, T>
source§impl<'scope, T> ScopedJoinHandleExt<'scope, T> for ScopedJoinHandle<'scope, T>
Available on Web
only.
impl<'scope, T> ScopedJoinHandleExt<'scope, T> for ScopedJoinHandle<'scope, T>
Available on
Web
only.source§fn join_async<'handle>(
&'handle mut self,
) -> ScopedJoinHandleFuture<'handle, 'scope, T> ⓘ
fn join_async<'handle>( &'handle mut self, ) -> ScopedJoinHandleFuture<'handle, 'scope, T> ⓘ
Async version of
ScopedJoinHandle::join()
. Read moreAuto Trait Implementations§
impl<'scope, T> Freeze for ScopedJoinHandle<'scope, T>
impl<'scope, T> !RefUnwindSafe for ScopedJoinHandle<'scope, T>
impl<'scope, T> Send for ScopedJoinHandle<'scope, T>
impl<'scope, T> Sync for ScopedJoinHandle<'scope, T>
impl<'scope, T> Unpin for ScopedJoinHandle<'scope, T>
impl<'scope, T> !UnwindSafe for ScopedJoinHandle<'scope, 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