pub struct TaskRef<'a> { /* private fields */ }
Expand description
A wrapper for a shared reference to Task
that isn’t Send
.
We make this explicitly not Send
so that we can use it to represent the current thread
without having to increment/decrement the task’s reference count.
Invariants
The wrapped Task
remains valid for the lifetime of the object.
Methods from Deref<Target = Task>
sourcepub fn group_leader(&self) -> &Task
pub fn group_leader(&self) -> &Task
Returns the group leader of the given task.
sourcepub fn signal_pending(&self) -> bool
pub fn signal_pending(&self) -> bool
Determines whether the given task has pending signals.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TaskRef<'a>
impl<'a> !Send for TaskRef<'a>
impl<'a> !Sync for TaskRef<'a>
impl<'a> Unpin for TaskRef<'a>
impl<'a> !UnwindSafe for TaskRef<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more