6#ifndef OPENCBDC_TX_SRC_COMMON_THREAD_POOL_H_
7#define OPENCBDC_TX_SRC_COMMON_THREAD_POOL_H_
26 void push(
const std::function<
void()>& fn);
31 std::atomic_bool m_running{
false};
36 std::vector<std::shared_ptr<thread_type>> m_threads;
38 static void thread_loop(
const std::shared_ptr<thread_type>& thr);
Thread-safe producer-consumer FIFO queue supporting multiple concurrent producers and consumers.
auto operator=(const thread_pool &) -> thread_pool &=delete
thread_pool(thread_pool &&)=delete
void push(const std::function< void()> &fn)
auto operator=(thread_pool &&) -> thread_pool &=delete
thread_pool(const thread_pool &)=delete