![]() |
TrinityCore
|
#include <LockedQueue.h>
Public Member Functions | |
| void | add (T const &item) |
| Adds an item to the queue. | |
| void | add (T &&item) |
| Adds an item to the queue. | |
| template<std::input_iterator Iterator> | |
| void | readd (Iterator begin, Iterator end) |
| Adds items back to front of the queue. | |
| bool | next (T &result) |
| Gets the next result in the queue, if any. | |
| template<class Checker > | |
| bool | next (T &result, Checker &check) |
| void | cancel () |
| Cancels the queue. | |
| bool | cancelled () |
| Checks if the queue is cancelled. | |
| void | pop_front () |
| ! Calls pop_front of the queue | |
| bool | empty () |
| ! Checks if we're empty or not with locks held | |
Private Attributes | |
| std::mutex | _lock |
| Lock access to the queue. | |
| StorageType | _queue |
| Storage backing the queue. | |
| bool | _canceled = false |
| Cancellation flag. | |
Definition at line 26 of file LockedQueue.h.
|
inline |
Adds an item to the queue.
Definition at line 47 of file LockedQueue.h.
|
inline |
Adds an item to the queue.
Definition at line 40 of file LockedQueue.h.
Here is the caller graph for this function:
|
inline |
Cancels the queue.
Definition at line 90 of file LockedQueue.h.
|
inline |
Checks if the queue is cancelled.
Definition at line 97 of file LockedQueue.h.
|
inline |
! Checks if we're empty or not with locks held
Definition at line 111 of file LockedQueue.h.
|
inline |
Gets the next result in the queue, if any.
Definition at line 62 of file LockedQueue.h.
Here is the caller graph for this function:
|
inline |
Definition at line 74 of file LockedQueue.h.
|
inline |
! Calls pop_front of the queue
Definition at line 104 of file LockedQueue.h.
|
inline |
Adds items back to front of the queue.
Definition at line 55 of file LockedQueue.h.
Here is the caller graph for this function:
|
private |
Cancellation flag.
Definition at line 35 of file LockedQueue.h.
|
private |
Lock access to the queue.
Definition at line 29 of file LockedQueue.h.
|
private |
Storage backing the queue.
Definition at line 32 of file LockedQueue.h.