Lock‐free notification queue of tasks consumed by a single consumer.
Synopsis
Declared in <folly/io/async/EventBaseAtomicNotificationQueue.h>
template<
typename Task,
typename Consumer>
class EventBaseAtomicNotificationQueue;
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the queue, detaching it from its EventBase. |
Executes all tasks until the queue is empty. Can be called from consumer thread only. |
|
Checks if the queue is empty. Can be called from consumer thread only. |
|
Executes one round of tasks. Re‐activates the event if more tasks are available. Can be called from consumer thread only. |
|
Returns the maximum number of tasks processed in a single round. |
|
Adds a task into the queue. Can be called from any thread. |
|
Set the maximum number of tasks processed in a single round. Can be called from consumer thread only. |
|
Returns the number of tasks in the queue. Can be called from any thread. |
|
Attaches the queue to an EventBase. Can be called from consumer thread only. |
|
Attaches the queue to an EventBase. Can be called from consumer thread only. |
|
Detaches the queue from an EventBase. Can be called from consumer thread only. |
|
Adds a task into the queue unless the max queue size is reached. Returns true iff the task was queued. Can be called from any thread. |
Created with MrDocs