Struct glib::ThreadHandle
source · pub struct ThreadHandle<T> {
rx: Receiver<Result<T>>,
}
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.
Fields§
§rx: Receiver<Result<T>>
Implementations§
source§impl<T> ThreadHandle<T>
impl<T> ThreadHandle<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ThreadHandle<T>
impl<T> RefUnwindSafe for ThreadHandle<T>
impl<T> Send for ThreadHandle<T>where
T: Send,
impl<T> !Sync for ThreadHandle<T>
impl<T> Unpin for ThreadHandle<T>
impl<T> UnwindSafe for ThreadHandle<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