78# include <condition_variable>
106template <
class WorkerFct>
128 std::unique_lock<std::mutex> lock(
m);
137 cond.wait(lock, [
this]
156 catch (std::exception & e)
158 std::cout <<
"Warning: workers exception "
159 << e.what() << std::endl;
184 const size_t qsize,
const size_t n = 16)
187 for (
size_t i = 0; i < n; ++i)
198 std::unique_lock<std::mutex> lock(
m);
217 std::unique_lock<std::mutex> lock(
m);
233 std::unique_lock<std::mutex> lock(
m);
245 std::unique_lock<std::mutex> lock(
m);
Exception handling system with formatted messages for Aleph-w.
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Append a new item by copy.
Very simple queue implemented with a contiguous array.
T & put(const T &item) noexcept
Put an item into the queue by copy.
constexpr bool is_empty() const noexcept
Return true if the queue is empty.
T get() noexcept
Remove the oldest item of the queue.
void mutable_for_each(Operation &operation)
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Circular queue implementations backed by arrays.