proxygen
|
Public Member Functions | |
template<typename... PQArgs, typename = decltype(PriorityQueue(std::declval<PQArgs>()...))> | |
BaselinePQ (size_t maxSize=0, PQArgs...args) | |
bool | empty () const |
size_t | size () const |
bool | try_push (const T &val) |
bool | try_pop (T &val) |
bool | try_peek (T &val) |
Private Attributes | |
Mutex | m_ |
size_t | maxSize_ |
PriorityQueue | pq_ |
std::condition_variable | notempty_ |
std::condition_variable | notfull_ |
Baseline implementation represents a conventional single-lock implementation that supports cond var blocking.
Definition at line 46 of file FlatCombiningPriorityQueueTest.cpp.
|
inlineexplicit |
Definition at line 51 of file FlatCombiningPriorityQueueTest.cpp.
|
inline |
Definition at line 54 of file FlatCombiningPriorityQueueTest.cpp.
References g(), BaselinePQ< T, PriorityQueue, Mutex >::m_, and BaselinePQ< T, PriorityQueue, Mutex >::pq_.
|
inline |
Definition at line 59 of file FlatCombiningPriorityQueueTest.cpp.
References g(), BaselinePQ< T, PriorityQueue, Mutex >::m_, and BaselinePQ< T, PriorityQueue, Mutex >::pq_.
Referenced by run_once().
|
inline |
Definition at line 90 of file FlatCombiningPriorityQueueTest.cpp.
References g(), BaselinePQ< T, PriorityQueue, Mutex >::m_, and BaselinePQ< T, PriorityQueue, Mutex >::pq_.
|
inline |
Definition at line 79 of file FlatCombiningPriorityQueueTest.cpp.
References g(), BaselinePQ< T, PriorityQueue, Mutex >::m_, BaselinePQ< T, PriorityQueue, Mutex >::notfull_, and BaselinePQ< T, PriorityQueue, Mutex >::pq_.
Referenced by test().
|
inline |
Definition at line 64 of file FlatCombiningPriorityQueueTest.cpp.
References g(), BaselinePQ< T, PriorityQueue, Mutex >::m_, BaselinePQ< T, PriorityQueue, Mutex >::maxSize_, BaselinePQ< T, PriorityQueue, Mutex >::notempty_, and BaselinePQ< T, PriorityQueue, Mutex >::pq_.
Referenced by test().
|
private |
Definition at line 100 of file FlatCombiningPriorityQueueTest.cpp.
Referenced by BaselinePQ< T, PriorityQueue, Mutex >::empty(), BaselinePQ< T, PriorityQueue, Mutex >::size(), BaselinePQ< T, PriorityQueue, Mutex >::try_peek(), BaselinePQ< T, PriorityQueue, Mutex >::try_pop(), and BaselinePQ< T, PriorityQueue, Mutex >::try_push().
|
private |
Definition at line 101 of file FlatCombiningPriorityQueueTest.cpp.
Referenced by BaselinePQ< T, PriorityQueue, Mutex >::try_push().
|
private |
Definition at line 103 of file FlatCombiningPriorityQueueTest.cpp.
Referenced by BaselinePQ< T, PriorityQueue, Mutex >::try_push().
|
private |
Definition at line 104 of file FlatCombiningPriorityQueueTest.cpp.
Referenced by BaselinePQ< T, PriorityQueue, Mutex >::try_pop().
|
private |
Definition at line 102 of file FlatCombiningPriorityQueueTest.cpp.
Referenced by BaselinePQ< T, PriorityQueue, Mutex >::empty(), BaselinePQ< T, PriorityQueue, Mutex >::size(), BaselinePQ< T, PriorityQueue, Mutex >::try_peek(), BaselinePQ< T, PriorityQueue, Mutex >::try_pop(), and BaselinePQ< T, PriorityQueue, Mutex >::try_push().