Retrieve a value from the front of the queue.
T pop();
T
must be MoveConstructible
.
Blocks the calling thread until there is at least one item on the
queue. Removes the front item from the queue and returns it. If
an exception is thrown by the move constructor of T
whilst retrieving the value
then that item is lost.
The item removed from the queue
Any exception thrown by the move constructor of T
.
jss::poisoned_queue
if *this
has been poisoned.
Only one thread may call pop()
or try_pop()
on a particular instance of
jss::mpsc_fifo
concurrently. If two
threads call pop()
or try_pop()
on the same instance and neither
call happens-before the other then the behaviour
is undefined.
A call to push()
synchronizes-with
a call to pop()
that retrieves the value pushed.
#include <jss/mpsc_fifo.hpp>