Documentation Home >> Headers >> <jss/mpsc_fifo.hpp> Header >> jss::mpsc_fifo >> jss::mpsc_fifo::poison member function

"Poisons" the queue so that no more items can be pushed or popped.

void poison();

Effects:

Marks *this as poisoned. If any threads are currently blocked in pop() waiting on *this then they are woken, and will throw a jss::poisoned_queue exception. Any subsequent calls of push(), pop() or try_pop() on *this will throw a jss:poisoned_queue exception.

Poisoning is an irreversible operation.

Throws:

Nothing.

Synchronization:

poison() can be called concurrently with push(), pop() and try_pop() without any external synchronization.

Header

#include <jss/mpsc_fifo.hpp>

See Also