MySQL 8.4.2
Source Code Documentation
|
provide waiting pop and push operator to thread-safe queues. More...
#include <waiting_queue_adaptor.h>
Public Types | |
using | value_type = typename Q::value_type |
Public Member Functions | |
value_type | pop () |
dequeue an item from a queue. More... | |
bool | try_pop (value_type &item) |
dequeue an item from a queue if queue is not empty. More... | |
void | push (const value_type &item) |
enqueue item into queue. More... | |
void | push (value_type &&item) |
bool | try_push (const value_type &item) |
enqueue an item into a queue if queue is not full. More... | |
Private Member Functions | |
void | notify_dequeueable () |
void | notify_enqueueable () |
Private Attributes | |
Q | q_ |
std::mutex | dequeueable_cond_mutex_ |
std::condition_variable | dequeueable_cond_ |
std::mutex | enqueueable_cond_mutex_ |
std::condition_variable | enqueueable_cond_ |
provide waiting pop and push operator to thread-safe queues.
using mysql_harness::WaitingQueueAdaptor< Q >::value_type = typename Q::value_type |
|
inlineprivate |
|
inlineprivate |
|
inline |
dequeue an item from a queue.
Waits until item becomes available.
|
inline |
enqueue item into queue.
waits until queue is not full anymore.
item | item to enqueue |
|
inline |
|
inline |
dequeue an item from a queue if queue is not empty.
item | dequeued item if queue was not empty |
true | item dequeued |
false | queue was empty |
|
inline |
enqueue an item into a queue if queue is not full.
item | item to enqueue |
true | item enqueued |
false | queue was full |
|
private |
|
private |
|
private |
|
private |
|
private |