Skip to main content

TaskHandle

Trait TaskHandle 

Source
pub trait TaskHandle: Send + Sync {
    // Required methods
    fn cancel(&self);
    fn is_cancelled(&self) -> bool;
}
Expand description

Opaque handle returned when a task is started.

Required Methods§

Source

fn cancel(&self)

Request cancellation of the running task.

Source

fn is_cancelled(&self) -> bool

Check if cancellation has been requested.

Implementors§