pub struct TaskHandle<T> { /* private fields */ }Expand description
A handle to a submitted task, used to retrieve the result.
§Example
use philiprehberger_task_queue::TaskQueue;
let queue = TaskQueue::new(1);
let handle = queue.submit(|| 42);
assert_eq!(handle.join().unwrap(), 42);
queue.shutdown();Implementations§
Source§impl<T> TaskHandle<T>
impl<T> TaskHandle<T>
Auto Trait Implementations§
impl<T> Freeze for TaskHandle<T>
impl<T> RefUnwindSafe for TaskHandle<T>
impl<T> Send for TaskHandle<T>where
T: Send,
impl<T> Sync for TaskHandle<T>where
T: Send,
impl<T> Unpin for TaskHandle<T>
impl<T> UnsafeUnpin for TaskHandle<T>
impl<T> UnwindSafe for TaskHandle<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