AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "PCQueue.h"
Public Member Functions | |
ProducerConsumerQueue () | |
void | Push (const T &value) |
bool | Empty () |
std::size_t | Size () const |
bool | Pop (T &value) |
void | WaitAndPop (T &value) |
void | Cancel () |
Private Member Functions | |
template<typename E = T> | |
std::enable_if< std::is_pointer< E >::value >::type | DeleteQueuedObject (E &obj) |
template<typename E = T> | |
std::enable_if<!std::is_pointer< E >::value >::type | DeleteQueuedObject (E const &) |
Private Attributes | |
std::mutex | _queueLock |
std::queue< T > | _queue |
std::condition_variable | _condition |
std::atomic< bool > | _shutdown |
|
inline |
|
inline |
References ProducerConsumerQueue< T >::_condition, ProducerConsumerQueue< T >::_queue, ProducerConsumerQueue< T >::_queueLock, ProducerConsumerQueue< T >::_shutdown, and ProducerConsumerQueue< T >::DeleteQueuedObject().
Referenced by MapUpdater::deactivate(), and DatabaseWorker::~DatabaseWorker().
|
inlineprivate |
Referenced by ProducerConsumerQueue< T >::Cancel().
|
inlineprivate |
|
inline |
References ProducerConsumerQueue< T >::_queue, and ProducerConsumerQueue< T >::_queueLock.
|
inline |
References ProducerConsumerQueue< T >::_queue, ProducerConsumerQueue< T >::_queueLock, and ProducerConsumerQueue< T >::_shutdown.
|
inline |
References ProducerConsumerQueue< T >::_condition, ProducerConsumerQueue< T >::_queue, and ProducerConsumerQueue< T >::_queueLock.
Referenced by MapUpdater::schedule_lfg_update(), and MapUpdater::schedule_update().
|
inline |
References ProducerConsumerQueue< T >::_queue.
|
inline |
References ProducerConsumerQueue< T >::_condition, ProducerConsumerQueue< T >::_queue, ProducerConsumerQueue< T >::_queueLock, and ProducerConsumerQueue< T >::_shutdown.
Referenced by DatabaseWorker::WorkerThread(), and MapUpdater::WorkerThread().
|
private |
|
private |
|
private |
|
private |