pub struct PreparedCurrentPark { /* private fields */ }Expand description
Move-only ownership of one prepared current-thread park transaction.
Implementations§
Source§impl PreparedCurrentPark
impl PreparedCurrentPark
Sourcepub fn thread_id(&self) -> ThreadId
pub fn thread_id(&self) -> ThreadId
Returns the generation-bearing scheduler identity being parked.
Sourcepub fn wake_handle(&self) -> ThreadWakeHandle
pub fn wake_handle(&self) -> ThreadWakeHandle
Returns a generation-bearing wake capability for this parked thread.
External waiter queues should publish only this restricted capability, not a full scheduler thread handle.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Returns this park attempt’s monotonically increasing generation.
Sourcepub fn arm_deadline(
&mut self,
deadline: MonotonicDeadline,
) -> Result<(), TaskError>
pub fn arm_deadline( &mut self, deadline: MonotonicDeadline, ) -> Result<(), TaskError>
Arms an absolute deadline in the runtime’s finite monotonic domain.
Sourcepub fn commit(self) -> Result<CurrentParkResume, TaskError>
pub fn commit(self) -> Result<CurrentParkResume, TaskError>
Commits the scheduler park and returns after this thread is runnable again.
Trait Implementations§
Source§impl Debug for PreparedCurrentPark
impl Debug for PreparedCurrentPark
Source§impl Drop for PreparedCurrentPark
impl Drop for PreparedCurrentPark
Auto Trait Implementations§
impl !RefUnwindSafe for PreparedCurrentPark
impl !UnwindSafe for PreparedCurrentPark
impl Freeze for PreparedCurrentPark
impl Send for PreparedCurrentPark
impl Sync for PreparedCurrentPark
impl Unpin for PreparedCurrentPark
impl UnsafeUnpin for PreparedCurrentPark
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