pub unsafe fn unpark_filter<F, C>(
) -> UnparkResult where
F: FnMut(ParkToken) -> FilterOp,
C: FnOnce(UnparkResult) -> UnparkToken,
Unparks a number of threads from the front of the queue associated with
key depending on the results of a filter function which inspects the
ParkToken associated with each thread.
filter function is called for each thread in the queue or until
FilterOp::Stop is returned. This function is passed the
associated with a particular thread, which is unparked if
callback function is also called while both queues are locked. It is
UnparkResult indicating the number of threads that were unparked
and whether there are still parked threads in the queue. This
value is also returned by
callback function should return an
UnparkToken value which will be
passed to all threads that are 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 functions are called while the queue is locked
and must not panic or call into any function in