parking_lot_core

Function unpark_all

Source
pub unsafe fn unpark_all(key: usize, unpark_token: UnparkToken) -> usize
Expand description

Unparks all threads in the queue associated with the given key.

The given UnparkToken is passed to all unparked threads.

This function returns the number of threads that were unparked.

ยงSafety

You should only call this function with an address that you control, since you could otherwise interfere with the operation of other synchronization primitives.

The parking_lot functions are not re-entrant and calling this method from the context of an asynchronous signal handler may result in undefined behavior, including corruption of internal state and/or deadlocks.