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)
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)
Apply a mutable operation to each element of the container.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
Circular queue implementations backed by arrays.