proxygen
|
#include <PriorityLifoSemMPMCQueue.h>
Public Member Functions | |
PriorityLifoSemMPMCQueue (uint8_t numPriorities, size_t max_capacity) | |
PriorityLifoSemMPMCQueue (folly::Range< const size_t * > capacities) | |
uint8_t | getNumPriorities () override |
BlockingQueueAddResult | add (T item) override |
BlockingQueueAddResult | addWithPriority (T item, int8_t priority) override |
T | take () override |
folly::Optional< T > | try_take_for (std::chrono::milliseconds time) override |
bool | nonBlockingTake (T &item) |
size_t | size () override |
size_t | sizeGuess () const |
Public Member Functions inherited from folly::BlockingQueue< T > | |
virtual | ~BlockingQueue ()=default |
Private Attributes | |
folly::LifoSem | sem_ |
std::vector< folly::MPMCQueue< T > > | queues_ |
Definition at line 29 of file PriorityLifoSemMPMCQueue.h.
|
inline |
Definition at line 34 of file PriorityLifoSemMPMCQueue.h.
References i, int8_t, and folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_.
|
inline |
Definition at line 41 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_, and folly::Range< Iter >::size().
|
inlineoverridevirtual |
Implements folly::BlockingQueue< T >.
Definition at line 55 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::addWithPriority(), folly::Executor::MID_PRI, and folly::gen::move.
|
inlineoverridevirtual |
Reimplemented from folly::BlockingQueue< T >.
Definition at line 59 of file PriorityLifoSemMPMCQueue.h.
References folly::BLOCK, folly::PriorityLifoSemMPMCQueue< T, kBehavior >::getNumPriorities(), max, min, folly::gen::move, folly::detail::LifoSemBase< Handoff, Atom >::post(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_, folly::PriorityLifoSemMPMCQueue< T, kBehavior >::sem_, folly::THROW, and fizz::detail::write().
Referenced by folly::PriorityLifoSemMPMCQueue< T, kBehavior >::add(), and TEST().
|
inlineoverridevirtual |
Reimplemented from folly::BlockingQueue< T >.
Definition at line 50 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_.
Referenced by folly::PriorityLifoSemMPMCQueue< T, kBehavior >::addWithPriority().
|
inline |
Definition at line 100 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_.
Referenced by folly::PriorityLifoSemMPMCQueue< T, kBehavior >::take(), and folly::PriorityLifoSemMPMCQueue< T, kBehavior >::try_take_for().
|
inlineoverridevirtual |
Implements folly::BlockingQueue< T >.
Definition at line 109 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_.
Referenced by folly::PriorityLifoSemMPMCQueue< T, kBehavior >::sizeGuess().
|
inline |
Definition at line 117 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::queues_, and folly::PriorityLifoSemMPMCQueue< T, kBehavior >::size().
|
inlineoverridevirtual |
Implements folly::BlockingQueue< T >.
Definition at line 78 of file PriorityLifoSemMPMCQueue.h.
References folly::PriorityLifoSemMPMCQueue< T, kBehavior >::nonBlockingTake(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::sem_, folly::T, and folly::detail::LifoSemBase< Handoff, Atom >::wait().
|
inlineoverridevirtual |
Implements folly::BlockingQueue< T >.
Definition at line 88 of file PriorityLifoSemMPMCQueue.h.
References folly::gen::move, folly::PriorityLifoSemMPMCQueue< T, kBehavior >::nonBlockingTake(), folly::none, folly::PriorityLifoSemMPMCQueue< T, kBehavior >::sem_, folly::T, and folly::detail::LifoSemBase< Handoff, Atom >::try_wait_for().
|
private |
Definition at line 127 of file PriorityLifoSemMPMCQueue.h.
Referenced by folly::PriorityLifoSemMPMCQueue< T, kBehavior >::addWithPriority(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::getNumPriorities(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::nonBlockingTake(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::PriorityLifoSemMPMCQueue(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::size(), and folly::PriorityLifoSemMPMCQueue< T, kBehavior >::sizeGuess().
|
private |