pub struct TaskAbortHandle { /* private fields */ }Expand description
A thread-safe handle for aborting a Task from another thread.
Obtained via Task::abort_handle. Cloning the handle is cheap; all
clones signal the same task. This mirrors Python ClusterShell’s ability
to abort a running task from any thread (task.abort(),
task_cleanup()), which the single-owner Rust Task cannot do through
&mut self while resume() is running.
Implementations§
Trait Implementations§
Source§impl Clone for TaskAbortHandle
impl Clone for TaskAbortHandle
Auto Trait Implementations§
impl Freeze for TaskAbortHandle
impl RefUnwindSafe for TaskAbortHandle
impl Send for TaskAbortHandle
impl Sync for TaskAbortHandle
impl Unpin for TaskAbortHandle
impl UnsafeUnpin for TaskAbortHandle
impl UnwindSafe for TaskAbortHandle
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