Module bagpipe::queue [] [src]

Implementation of two non-blocking queues.

  • GeneralYC, a fast, best-effort queue that will fail occasionally. See documentation of YangCrummeyQueue for more information on the algorithm.
  • FAAArrayQueue, a similar design reimplemented in rust. This is lock-free and always succeeds (i.e. it loops). See documentation on FAAQueueLowLevel for more information on the algorithm

Both of these data-structures are generated from lower-level implementations that operate only on word-sized types for efficient atomic operations.

The generalize macro takes these low-level SharedWeakBags only operating on word-sized Nodes and lifts them to SharedWeakBags operating on arbitrary types by boxing them and passing the underlying bag a raw pointer.

We expose the low-level data-structures (FAAQueueLowLevel and YangCrummeyQueue for FAAArrayQueue and GeneralYC, respectively) both for benchmarking purposes and to facilitate documentation; it does not seem possible to generate custom doc comments for those data-structures.

Structs

FAAArrayQueue

A macro-generated general data-structure supporting arbitrary Copy types.

FAAQueueLowLevel

Another fetch-add based concurrent queue.

GeneralYC

A macro-generated general data-structure supporting arbitrary Copy types.

Revoker
YangCrummeyQueue

A scalable queue with fairly weak guarantees.

Traits

RevokeFunc

Type Definitions

RevocableFAAQueue