pub unsafe fn unpark_one<C>(key: usize, callback: C) -> UnparkResult where
C: FnOnce(UnparkResult) -> UnparkToken,
Unparks one thread from the queue associated with the given key.
callback function is called while the queue is locked and before the
target thread is woken up. The
UnparkResult argument to the function
indicates whether a thread was found in the queue and whether this was the
last thread in the queue. This value is also returned by
callback function should return an
UnparkToken value which will be
passed to the thread that is unparked. If no thread is unparked then the
returned value is ignored.
You should only call this function with an address that you control, since you could otherwise interfere with the operation of other synchronization primitives.
callback function is called while the queue is locked and must not
panic or call into any function in