pub struct TaskHandle { /* private fields */ }Expand description
An owned permission to perform actions on a task.
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn pause(&self)
pub fn pause(&self)
Pause execution of the task. This can have unintended consequences if you are not careful, for example, if this task is holding a mutex when paused, there is no way to retrieve it until the task is unpaused.
Sourcepub fn set_priority(&self, priority: impl Into<u32>)
pub fn set_priority(&self, priority: impl Into<u32>)
Sets the task’s priority, allowing you to control how much cpu time is allocated to it.
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§fn clone(&self) -> TaskHandle
fn clone(&self) -> TaskHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskHandle
impl Debug for TaskHandle
Source§impl Hash for TaskHandle
impl Hash for TaskHandle
Source§impl PartialEq for TaskHandle
impl PartialEq for TaskHandle
impl Eq for TaskHandle
impl Send for TaskHandle
Auto Trait Implementations§
impl Freeze for TaskHandle
impl RefUnwindSafe for TaskHandle
impl !Sync for TaskHandle
impl Unpin for TaskHandle
impl UnwindSafe for TaskHandle
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