#include <userver/concurrent/queue_helpers.hpp>
Definition at line 95 of file queue_helpers.hpp.
Public Member Functions | |
Consumer (const Consumer &)=delete | |
Consumer (Consumer &&) noexcept=default | |
Consumer & | operator= (const Consumer &)=delete |
Consumer & | operator= (Consumer &&other) noexcept |
bool | Pop (ValueType &value, engine::Deadline deadline={}) const |
bool | PopNoblock (ValueType &value) const |
void | Reset () && |
std::shared_ptr< const QueueType > | Queue () const |
Const access to source queue. | |
|
inline |
Definition at line 114 of file queue_helpers.hpp.
|
inlinenoexcept |
Definition at line 108 of file queue_helpers.hpp.
|
inline |
Pop element from queue. May wait asynchronously if the queue is empty, but the producer is alive.
false
can be returned before the deadline when the producer is no longer alive. engine::Deadline
is a wrapper over std::chrono::time_point
, not duration
! If you need a timeout, you must reconstruct the deadline in the loop. Definition at line 127 of file queue_helpers.hpp.
|
inline |
Try to pop element from queue without blocking. May be used in non-coroutine environment
Definition at line 136 of file queue_helpers.hpp.
|
inline |
Const access to source queue.
Definition at line 148 of file queue_helpers.hpp.
|
inline |
Definition at line 141 of file queue_helpers.hpp.