# [−][src]Function parking_lot_core::unpark_requeue

    pub unsafe fn unpark_requeue<V, C>(
        key_from: usize,
        key_to: usize,
        validate: V,
        callback: C
    ) -> UnparkResult where
        V: FnOnce() -> RequeueOp,
        C: FnOnce(RequeueOp, UnparkResult) -> UnparkToken,

Removes all threads from the queue associated with `key_from`, optionally unparks the first one and requeues the rest onto the queue associated with `key_to`.

The `validate` function is called while both queues are locked. Its return value will determine which operation is performed, or whether the operation should be aborted. See `RequeueOp` for details about the different possible return values.

The `callback` function is also called while both queues are locked. It is passed the `RequeueOp` returned by `validate` and an `UnparkResult` indicating whether a thread was unparked and whether there are threads still parked in the new queue. This `UnparkResult` value is also returned by `unpark_requeue`.

The `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.

# 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 `validate` and `callback` functions are called while the queue is locked and must not panic or call into any function in `parking_lot`.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)