#include <concurrency.h>
Public Member Functions | |
void | blocking_enqueue (T &&item) |
void | clear () |
bool | dequeue (T *item, unsigned int timeout_ms) |
void | enqueue (T &&item) |
bool | peek (T **item) |
single_consumer_queue (unsigned int cap=QUEUE_MAX_SIZE, std::function< void(T const &)> on_drop_callback=nullptr) | |
size_t | size () |
void | start () |
bool | try_dequeue (T *item) |
Private Attributes | |
bool | _accepting |
unsigned int | _cap |
std::condition_variable | _deq_cv |
std::condition_variable | _enq_cv |
std::mutex | _mutex |
std::atomic< bool > | _need_to_flush |
std::function< void(T const &)> | _on_drop_callback |
std::deque< T > | _queue |
std::atomic< bool > | _was_flushed |
Definition at line 15 of file concurrency.h.
|
inlineexplicit |
Definition at line 31 of file concurrency.h.
|
inline |
Definition at line 54 of file concurrency.h.
|
inline |
Definition at line 117 of file concurrency.h.
|
inline |
Definition at line 69 of file concurrency.h.
|
inline |
Definition at line 35 of file concurrency.h.
|
inline |
Definition at line 105 of file concurrency.h.
|
inline |
Definition at line 140 of file concurrency.h.
|
inline |
Definition at line 133 of file concurrency.h.
|
inline |
Definition at line 90 of file concurrency.h.
|
private |
Definition at line 23 of file concurrency.h.
|
private |
Definition at line 22 of file concurrency.h.
|
private |
Definition at line 19 of file concurrency.h.
|
private |
Definition at line 20 of file concurrency.h.
|
private |
Definition at line 18 of file concurrency.h.
|
private |
Definition at line 27 of file concurrency.h.
|
private |
Definition at line 29 of file concurrency.h.
|
private |
Definition at line 17 of file concurrency.h.
|
private |
Definition at line 28 of file concurrency.h.