template <typename T>
class BlockingMpscQueue
Defined at line 23 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
A multiproducer single consumer queue which blocks for the consumer.
Public Methods
std::queue<T> Extract (BlockingMpscQueue<T> && queue)
Deconstructs the queue and returns all its elements.
This should only be called on the consumer thread.
Defined at line 28 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
void BlockingMpscQueue<T> ()
Defined at line 38 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
template <typename U>
void Push (U && element)
Defined at line 44 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
void StopAllWaits ()
Stops all waiting threads. We call this when a stream is stopped to abort
the input processing loop.
Defined at line 51 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
void Reset (bool keep_data)
Resets the queue to its default state.
Defined at line 57 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
std::optional<T> WaitForElement ()
Get an element or block until one is available if the queue is empty.
If a thread calls StopAllWaits(), std::nullopt is returned.
This should only be called on the consumer thread.
Defined at line 68 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h
bool Signaled ()
Returns true if queue has been pushed to but WaitForElement has not yet been called
Defined at line 81 of file ../../src/media/lib/blocking_mpsc_queue/blocking_mpsc_queue.h