#include <blocking_queue.h>
Public Member Functions | |
BlockingQueue () | |
BlockingQueue (const BlockingQueue &) | |
BlockingQueue (const size_t queue_size) | |
BlockingQueue & | operator= (const BlockingQueue &) |
template<typename R > | |
const R * | Peek () |
template<typename R > | |
R * | PeekWithTimeout (const common::Duration timeout) |
T | Pop () |
T | PopWithTimeout (const common::Duration timeout) |
void | Push (T t) |
bool | PushWithTimeout (T t, const common::Duration timeout) |
size_t | Size () |
void | WaitUntilEmpty () |
Static Public Attributes | |
static constexpr size_t | kInfiniteQueueSize = 0 |
Private Member Functions | |
const size_t queue_size_ | GUARDED_BY (mutex_) |
std::deque< T > deque_ | GUARDED_BY (mutex_) |
bool | QueueEmptyCondition () EXCLUSIVE_LOCKS_REQUIRED(mutex_) |
bool | QueueNotFullCondition () EXCLUSIVE_LOCKS_REQUIRED(mutex_) |
Private Attributes | |
absl::Mutex | mutex_ |
Definition at line 35 of file blocking_queue.h.
cartographer::common::BlockingQueue< T >::BlockingQueue | ( | ) | [inline] |
Definition at line 40 of file blocking_queue.h.
cartographer::common::BlockingQueue< T >::BlockingQueue | ( | const BlockingQueue< T > & | ) |
cartographer::common::BlockingQueue< T >::BlockingQueue | ( | const size_t | queue_size | ) | [inline, explicit] |
Definition at line 46 of file blocking_queue.h.
const size_t queue_size_ cartographer::common::BlockingQueue< T >::GUARDED_BY | ( | mutex_ | ) | [private] |
std::deque<T> deque_ cartographer::common::BlockingQueue< T >::GUARDED_BY | ( | mutex_ | ) | [private] |
BlockingQueue& cartographer::common::BlockingQueue< T >::operator= | ( | const BlockingQueue< T > & | ) |
const R* cartographer::common::BlockingQueue< T >::Peek | ( | ) | [inline] |
Definition at line 118 of file blocking_queue.h.
R* cartographer::common::BlockingQueue< T >::PeekWithTimeout | ( | const common::Duration | timeout | ) | [inline] |
Definition at line 102 of file blocking_queue.h.
T cartographer::common::BlockingQueue< T >::Pop | ( | ) | [inline] |
Definition at line 73 of file blocking_queue.h.
T cartographer::common::BlockingQueue< T >::PopWithTimeout | ( | const common::Duration | timeout | ) | [inline] |
Definition at line 86 of file blocking_queue.h.
void cartographer::common::BlockingQueue< T >::Push | ( | T | t | ) | [inline] |
Definition at line 49 of file blocking_queue.h.
bool cartographer::common::BlockingQueue< T >::PushWithTimeout | ( | T | t, |
const common::Duration | timeout | ||
) | [inline] |
Definition at line 59 of file blocking_queue.h.
bool cartographer::common::BlockingQueue< T >::QueueEmptyCondition | ( | ) | [inline, private] |
Definition at line 143 of file blocking_queue.h.
bool cartographer::common::BlockingQueue< T >::QueueNotFullCondition | ( | ) | [inline, private] |
Definition at line 148 of file blocking_queue.h.
size_t cartographer::common::BlockingQueue< T >::Size | ( | ) | [inline] |
Definition at line 127 of file blocking_queue.h.
void cartographer::common::BlockingQueue< T >::WaitUntilEmpty | ( | ) | [inline] |
Definition at line 133 of file blocking_queue.h.
constexpr size_t cartographer::common::BlockingQueue< T >::kInfiniteQueueSize = 0 [static] |
Definition at line 37 of file blocking_queue.h.
absl::Mutex cartographer::common::BlockingQueue< T >::mutex_ [private] |
Definition at line 152 of file blocking_queue.h.