pub struct ThreadHandle<T> { /* private fields */ }
Expand description
A handle to a thread running on a ThreadPool
.
Like std::thread::JoinHandle
for a GLib thread. The return value from the task can be
retrieved by calling ThreadHandle::join
. Dropping the handle “detaches” the thread,
allowing it to complete but discarding the return value.
Waits for the associated thread to finish.
Blocks until the associated thread returns. Returns Ok
with the value returned from the
thread, or Err
if the thread panicked. This function will return immediately if the
associated thread has already finished.
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.