Abstract interface for a queue that can block callers until items are available.
Synopsis
Declared in <folly/executors/task_queue/BlockingQueue.h>
template<class T>
class BlockingQueue;
Member Functions
Name |
Description |
|
Destroy the queue. |
|
Adds item to the queue. |
|
Adds item to the queue with the given priority. |
|
Returns the number of priority levels supported by the queue. |
|
Returns the number of items currently in the queue. |
|
Removes and returns an item from the queue, blocking until one is available. |
|
Removes and returns an item from the queue, waiting up to the given time. |
Derived Classes
Name |
Description |
A blocking multi‐producer, multi‐consumer queue backed by a LIFO semaphore. |
|
A blocking queue with priority levels backed by per‐priority MPMC queues and a LIFO semaphore. |
|
A blocking queue with a fixed number of priority levels. |
|
Blocking queue holding threads that have stopped and await joining. |
|
A BlockingQueue sharded by LLC cache. Compared to the default PriorityUnboundedBlockingQueue, this can reduce contention on systems with a large number of LLC caches, at the cost of unfairness and work conservation; see the StripedThrottledLifoSem documentation for a detailed explanation. |
|
A blocking queue with unbounded capacity. |
Created with MrDocs