|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
A simple thread-safe (mutex + condition-variable) FIFO queue. More...
#include <thread_pool.hpp>
Public Member Functions | |
| void | push (T item) |
| Push an item onto the queue and wake one waiter. | |
| T | pop () |
| Block until an item is available, then pop and return it. | |
| std::optional< T > | try_pop () |
| Pop and return an item if one is ready, otherwise std::nullopt (non-blocking). | |
A simple thread-safe (mutex + condition-variable) FIFO queue.
|
inline |
Block until an item is available, then pop and return it.
|
inline |
Push an item onto the queue and wake one waiter.
|
inline |
Pop and return an item if one is ready, otherwise std::nullopt (non-blocking).