Trait parking_lot_core::thread_parker::UnparkHandleT

source ·
pub trait UnparkHandleT {
    // Required method
    unsafe fn unpark(self);
}
Expand description

Handle for a thread that is about to be unparked. We need to mark the thread as unparked while holding the queue lock, but we delay the actual unparking until after the queue lock is released.

Required Methods§

source

unsafe fn unpark(self)

Wakes up the parked thread. This should be called after the queue lock is released to avoid blocking the queue for too long.

This method is unsafe for the same reason as the unsafe methods in ThreadParkerT.

Implementors§