![]() |
TrinityCore
|
#include <LockedQueue.h>
Public Member Functions | |
void | add (T const &item) |
Adds an item to the queue. More... | |
void | add (T &&item) |
Adds an item to the queue. More... | |
template<std::input_iterator Iterator> | |
void | readd (Iterator begin, Iterator end) |
Adds items back to front of the queue. More... | |
bool | next (T &result) |
Gets the next result in the queue, if any. More... | |
template<class Checker > | |
bool | next (T &result, Checker &check) |
void | cancel () |
Cancels the queue. More... | |
bool | cancelled () |
Checks if the queue is cancelled. More... | |
void | pop_front () |
! Calls pop_front of the queue More... | |
bool | empty () |
! Checks if we're empty or not with locks held More... | |
Private Attributes | |
std::mutex | _lock |
Lock access to the queue. More... | |
StorageType | _queue |
Storage backing the queue. More... | |
bool | _canceled = false |
Cancellation flag. More... | |
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.
|
inline |
Cancels the queue.
Definition at line 89 of file LockedQueue.h.
|
inline |
Checks if the queue is cancelled.
Definition at line 96 of file LockedQueue.h.
|
inline |
! Checks if we're empty or not with locks held
Definition at line 110 of file LockedQueue.h.
|
inline |
Gets the next result in the queue, if any.
Definition at line 62 of file LockedQueue.h.
|
inline |
Definition at line 74 of file LockedQueue.h.
|
inline |
! Calls pop_front of the queue
Definition at line 103 of file LockedQueue.h.
|
inline |
Adds items back to front of the queue.
Definition at line 55 of file LockedQueue.h.
|
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.