|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
A reusable thread pool for efficient parallel task execution. More...
#include <thread_pool.H>
Classes | |
| struct | Task |
| Concrete task implementation with type preservation. More... | |
| struct | TaskBase |
| Type-erased task wrapper. More... | |
Public Member Functions | |
| ThreadPool (size_t n_threads=std::thread::hardware_concurrency()) | |
| Construct a thread pool with specified number of workers. | |
| ThreadPool (const ThreadPool &)=delete | |
| Deleted copy constructor. | |
| ThreadPool & | operator= (const ThreadPool &)=delete |
| Deleted copy assignment operator. | |
| ThreadPool (ThreadPool &&)=delete | |
| Deleted move constructor. | |
| ThreadPool & | operator= (ThreadPool &&)=delete |
| Deleted move assignment operator. | |
| ~ThreadPool () | |
| Destructor - stops all workers and waits for completion. | |
| template<typename F , typename... Args> | |
| auto | enqueue (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
| Submit a task for execution and get a future for the result. | |
| template<typename F , typename... Args> | |
| void | enqueue_detached (F &&f, Args &&... args) |
| Submit a task without tracking the result (fire-and-forget). | |
| template<typename F , typename Container > | |
| auto | enqueue_bulk (F &&f, const Container &args_container) -> std::vector< std::future< std::invoke_result_t< F, typename Container::value_type > > > |
| Submit multiple tasks and collect all futures. | |
| void | set_queue_limits (const size_t soft_limit, const size_t hard_limit=std::numeric_limits< size_t >::max()) |
| Set queue limits for bounded enqueue operations. | |
| std::pair< size_t, size_t > | get_queue_limits () const |
| Get current queue limits. | |
| template<typename F , typename... Args> | |
| auto | enqueue_bounded (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
| Submit a task with backpressure and memory protection. | |
| template<typename F , typename... Args> | |
| void | enqueue_bounded_detached (F &&f, Args &&... args) |
| Submit a task with backpressure, without tracking result. | |
| template<typename F , typename... Args> | |
| auto | try_enqueue (F &&f, Args &&... args) -> std::optional< std::future< std::invoke_result_t< F, Args... > > > |
| Try to submit a task without blocking or throwing. | |
| template<typename F , typename... Args> | |
| bool | try_enqueue_detached (F &&f, Args &&... args) |
| Try to submit a detached task without blocking or throwing. | |
| size_t | num_threads () const noexcept |
| Get the number of worker threads. | |
| size_t | pending_tasks () const |
| Get the number of pending tasks in the queue. | |
| size_t | running_tasks () const noexcept |
| Get the number of tasks currently being executed. | |
| bool | is_idle () const |
| Check if the pool is idle (no pending or running tasks). | |
| bool | is_stopped () const noexcept |
| Check if the pool has been shut down. | |
| void | shutdown () |
| Shut down the pool, completing all pending tasks. | |
| void | resize (size_t new_size) |
| Resize the pool to a different number of workers. | |
| void | wait_all (const std::chrono::milliseconds poll_interval=std::chrono::milliseconds(1)) |
| Wait until all current tasks complete. | |
| template<typename Rep , typename Period > | |
| bool | wait_all_for (std::chrono::duration< Rep, Period > timeout) |
| Wait until all current tasks complete, with timeout. | |
| template<typename Clock , typename Duration > | |
| bool | wait_all_until (std::chrono::time_point< Clock, Duration > deadline) |
| Wait until all current tasks complete, with deadline. | |
| ThreadPoolStats | get_stats () const |
| Get current pool statistics. | |
| void | reset_stats () |
| Reset statistics counters to zero. | |
| void | set_exception_callback (ExceptionCallback callback) |
| Set callback for exceptions in detached tasks. | |
| template<typename F , typename Container > | |
| auto | enqueue_batch (F &&f, const Container &args_list) -> std::vector< std::future< decltype(std::apply(f, *std::begin(args_list)))> > |
| Submit multiple tasks with a single notification. | |
Private Member Functions | |
| void | worker_loop () |
| Worker thread main loop. | |
| void | start_workers (size_t n) |
| Start n worker threads. | |
| void | stop_workers () |
| Stop and join all workers. | |
Static Private Member Functions | |
| template<typename F , typename... Args> | |
| static auto | make_invocable (F &&f, Args &&... args) |
| Helper to create a callable from function + arguments using std::invoke. | |
Private Attributes | |
| std::vector< std::thread > | workers |
| std::queue< std::unique_ptr< TaskBase > > | tasks |
| std::mutex | queue_mutex |
| std::condition_variable | condition |
| Notifies workers of new tasks. | |
| std::condition_variable | space_available |
| Notifies enqueuers of queue space. | |
| std::condition_variable | idle_condition |
| Notifies wait_all() of idle state. | |
| std::atomic< bool > | stop {false} |
| std::atomic< size_t > | active_tasks {0} |
| size_t | soft_limit_ = std::numeric_limits<size_t>::max() |
| Block threshold. | |
| size_t | hard_limit_ = std::numeric_limits<size_t>::max() |
| Exception threshold. | |
| std::atomic< size_t > | tasks_completed_ {0} |
| std::atomic< size_t > | tasks_failed_ {0} |
| std::atomic< size_t > | peak_queue_size_ {0} |
| ExceptionCallback | exception_callback_ |
A reusable thread pool for efficient parallel task execution.
Maintains a pool of worker threads that wait for tasks and execute them. This avoids the overhead of creating and destroying threads for each task.
The pool uses a shared task queue protected by a mutex. Workers wait on a condition variable and are notified when new tasks arrive.
This implementation uses std::invoke with std::tuple + std::apply instead of std::bind for better performance and move-only support. The overhead per task is approximately 50-100 nanoseconds.
get() is called.Definition at line 438 of file thread_pool.H.
|
inlineexplicit |
Construct a thread pool with specified number of workers.
| n_threads | Number of worker threads to create. Defaults to std::thread::hardware_concurrency(). |
Definition at line 567 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp(), and start_workers().
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
inline |
Destructor - stops all workers and waits for completion.
All pending tasks in the queue will be executed before shutdown.
Definition at line 591 of file thread_pool.H.
References stop_workers().
|
inline |
Submit a task for execution and get a future for the result.
This is the most general overload, supporting:
std::ref() / std::cref()| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable (via std::invoke). Use std::ref(x) to pass by reference. |
std::future that will hold the result (or exception).| std::runtime_error | if the pool has been shut down. |
Definition at line 640 of file thread_pool.H.
References Aleph::and, condition, Aleph::divide_and_conquer_partition_dp(), make_invocable(), peak_queue_size_, queue_mutex, stop, tasks, and tasks_completed_.
Referenced by enqueue_bulk(), example_basic_parallel(), example_performance(), Aleph::TaskGroup::launch(), Aleph::parallel_invoke(), Aleph::pminmax(), Aleph::NTTExact::pmultiply(), Aleph::pzip_all_n(), Aleph::pzip_count_if_n(), Aleph::pzip_exists_n(), Aleph::pzip_foldl_n(), Aleph::pzip_for_each_n(), Aleph::pzip_maps_n(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and try_enqueue().
|
inline |
Submit multiple tasks with a single notification.
More efficient than calling enqueue() multiple times when you have many tasks to submit, as it reduces mutex contention and notification overhead.
| f | The callable to execute for each argument set. |
| args_list | Container where each element is the arguments for one call. |
Definition at line 1323 of file thread_pool.H.
References Aleph::and, condition, Aleph::divide_and_conquer_partition_dp(), peak_queue_size_, queue_mutex, stop, tasks, and tasks_completed_.
|
inline |
Submit a task with backpressure and memory protection.
Unlike enqueue(), this method respects queue limits:
pending_tasks() >= soft_limit: blocks until space availablepending_tasks() >= hard_limit: throws queue_overflow_errorThis provides natural backpressure (producer slows down) and protects against memory exhaustion.
| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable. |
std::future that will hold the result.| queue_overflow_error | if queue size >= hard_limit. |
| std::runtime_error | if the pool has been shut down. |
Definition at line 883 of file thread_pool.H.
References condition, Aleph::divide_and_conquer_partition_dp(), hard_limit_, make_invocable(), queue_mutex, soft_limit_, space_available, stop, and tasks.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
Submit a task with backpressure, without tracking result.
Fire-and-forget version of enqueue_bounded(). Respects queue limits but doesn't return a future.
| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable. |
| queue_overflow_error | if queue size >= hard_limit. |
| std::runtime_error | if the pool has been shut down. |
Definition at line 953 of file thread_pool.H.
References condition, Aleph::divide_and_conquer_partition_dp(), hard_limit_, make_invocable(), queue_mutex, soft_limit_, space_available, stop, and tasks.
Referenced by example_backpressure(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Submit multiple tasks and collect all futures.
Convenience method for submitting a batch of similar tasks.
| F | Callable type. |
| Container | Container of argument sets (e.g., vector<tuple<Args...>>). |
| f | The callable to execute for each argument set. |
| args_container | Container where each element is the arguments for one call. |
Definition at line 792 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp(), and enqueue().
Referenced by example_batch_processing(), TEST_F(), TEST_F(), and TEST_F().
Submit a task without tracking the result (fire-and-forget).
More efficient than enqueue() when you don't need the result, as it avoids the overhead of promise/future.
| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable. |
| std::runtime_error | if the pool has been shut down. |
enqueue() if you need exception handling.Definition at line 722 of file thread_pool.H.
References Aleph::and, condition, Aleph::divide_and_conquer_partition_dp(), exception_callback_, make_invocable(), peak_queue_size_, queue_mutex, stop, tasks, tasks_completed_, and tasks_failed_.
Referenced by example_fire_and_forget(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and try_enqueue_detached().
|
inline |
Get current queue limits.
Definition at line 842 of file thread_pool.H.
References hard_limit_, queue_mutex, and soft_limit_.
Referenced by example_backpressure(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Get current pool statistics.
Returns a snapshot of various performance counters.
Definition at line 1249 of file thread_pool.H.
References active_tasks, Aleph::ThreadPoolStats::current_active, Aleph::ThreadPoolStats::current_queue_size, Aleph::ThreadPoolStats::num_workers, Aleph::ThreadPoolStats::peak_queue_size, peak_queue_size_, queue_mutex, tasks, Aleph::ThreadPoolStats::tasks_completed, tasks_completed_, Aleph::ThreadPoolStats::tasks_failed, tasks_failed_, and workers.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Check if the pool is idle (no pending or running tasks).
Definition at line 1111 of file thread_pool.H.
References active_tasks, Aleph::and, queue_mutex, and tasks.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and wait_all().
|
inlinenoexcept |
Check if the pool has been shut down.
Definition at line 1120 of file thread_pool.H.
References stop.
Helper to create a callable from function + arguments using std::invoke.
Definition at line 548 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp().
Referenced by enqueue(), enqueue_bounded(), enqueue_bounded_detached(), and enqueue_detached().
|
inlinenoexcept |
Get the number of worker threads.
Definition at line 1086 of file thread_pool.H.
References workers.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::NTT< MOD, ROOT >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::apply_butterflies(), Aleph::parallel_detail::effective_parallel_chunk_size(), example_basic_parallel(), example_batch_processing(), example_parallel_map(), example_parallel_sort(), example_performance(), example_performance_comparison(), Aleph::NTT< MOD, ROOT >::Plan::for_each_index(), Aleph::FFT< Real >::inverse_transform_real_optimized_impl(), Aleph::FFT< Real >::pbatched_stft(), Aleph::FFT< Real >::OverlapAddBank::pflush(), Aleph::FFT< Real >::Plan::pinverse_transform_real_batch(), Aleph::pminmax(), Aleph::NTTExact::pmultiply(), Aleph::FFT< Real >::OverlapAdd::pointwise_multiply(), Aleph::FFT< Real >::OverlapAddBank::pointwise_multiply_batch(), Aleph::FFT< Real >::Plan::ptransform_batch(), Aleph::NTT< MOD, ROOT >::Plan::ptransform_batch(), Aleph::pzip_all_n(), Aleph::pzip_count_if_n(), Aleph::pzip_exists_n(), Aleph::pzip_foldl_n(), Aleph::pzip_for_each_n(), Aleph::pzip_maps_n(), Aleph::NTTExact::reconstruct_product(), Aleph::FFT< Real >::should_parallelize_batch_work(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and Aleph::FFT< Real >::transform_stft_frames().
|
delete |
Deleted copy assignment operator.
|
delete |
Deleted move assignment operator.
|
inline |
Get the number of pending tasks in the queue.
Definition at line 1094 of file thread_pool.H.
References queue_mutex, and tasks.
Referenced by example_backpressure(), TEST_F(), and TEST_F().
|
inline |
Reset statistics counters to zero.
Definition at line 1266 of file thread_pool.H.
References peak_queue_size_, tasks_completed_, and tasks_failed_.
Referenced by TEST_F().
|
inline |
Resize the pool to a different number of workers.
Stops all current workers and starts a new set with the specified size. Any tasks currently in the queue will be preserved and executed by the new workers.
| new_size | New number of worker threads. |
| std::runtime_error | if the pool has been shut down. |
Definition at line 1163 of file thread_pool.H.
References condition, Aleph::divide_and_conquer_partition_dp(), queue_mutex, start_workers(), stop, and workers.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Get the number of tasks currently being executed.
Definition at line 1103 of file thread_pool.H.
References active_tasks.
|
inline |
Set callback for exceptions in detached tasks.
When a detached task throws an exception, this callback is invoked with the exception pointer. This allows logging or handling of exceptions that would otherwise be silently ignored.
| callback | Function to call with exception_ptr on task failure. Pass nullptr to disable. |
Definition at line 1294 of file thread_pool.H.
References exception_callback_, and queue_mutex.
|
inline |
Set queue limits for bounded enqueue operations.
Configures backpressure and memory protection for the task queue.
| soft_limit | When queue reaches this size, enqueue_bounded() blocks until space is available. Set to SIZE_MAX to disable blocking. |
| hard_limit | When queue reaches this size, enqueue_bounded() throws queue_overflow_error. Defaults to 10x soft_limit. Set to SIZE_MAX to disable the hard limit. |
enqueue_bounded() and enqueue_bounded_detached(). Regular enqueue() and enqueue_detached() are unaffected.Definition at line 826 of file thread_pool.H.
References Aleph::and, Aleph::divide_and_conquer_partition_dp(), hard_limit_, queue_mutex, and soft_limit_.
Referenced by example_backpressure(), example_load_shedding(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Shut down the pool, completing all pending tasks.
After calling this method:
Definition at line 1135 of file thread_pool.H.
References condition, Aleph::divide_and_conquer_partition_dp(), queue_mutex, stop, and workers.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlineprivate |
Start n worker threads.
Definition at line 524 of file thread_pool.H.
References worker_loop(), and workers.
Referenced by ThreadPool(), and resize().
|
inlineprivate |
Stop and join all workers.
Definition at line 532 of file thread_pool.H.
References condition, Aleph::divide_and_conquer_partition_dp(), queue_mutex, stop, and workers.
Referenced by ~ThreadPool().
|
inline |
Try to submit a task without blocking or throwing.
Non-blocking version of enqueue_bounded(). Returns immediately with either a future (if task was queued) or std::nullopt (if queue is full).
| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable. |
std::optional<std::future<R>> - contains the future if the task was successfully queued, or std::nullopt if the queue is at or above the soft limit.| std::runtime_error | only if the pool has been shut down. |
soft_limit as the threshold. Configure with set_queue_limits().Definition at line 1028 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp(), enqueue(), queue_mutex, soft_limit_, stop, and tasks.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
Try to submit a detached task without blocking or throwing.
Non-blocking version of enqueue_bounded_detached().
| F | Callable type. |
| Args | Argument types for the callable. |
| f | The callable to execute. |
| args | Arguments to pass to the callable. |
true if the task was queued, false if the queue is full.| std::runtime_error | only if the pool has been shut down. |
Definition at line 1068 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp(), enqueue_detached(), queue_mutex, soft_limit_, stop, and tasks.
Referenced by example_load_shedding(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Wait until all current tasks complete.
Blocks until the task queue is empty and no tasks are running. New tasks can still be enqueued while waiting.
| poll_interval | How often to check for completion (default 1ms). |
Definition at line 1199 of file thread_pool.H.
References Aleph::divide_and_conquer_partition_dp(), and is_idle().
Referenced by example_backpressure(), example_fire_and_forget(), example_load_shedding(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
Wait until all current tasks complete, with timeout.
Blocks until either:
| timeout | Maximum time to wait. |
Definition at line 1215 of file thread_pool.H.
References active_tasks, Aleph::and, Aleph::divide_and_conquer_partition_dp(), idle_condition, queue_mutex, and tasks.
|
inline |
Wait until all current tasks complete, with deadline.
Blocks until either:
| deadline | Time point at which to stop waiting. |
Definition at line 1234 of file thread_pool.H.
References active_tasks, Aleph::and, Aleph::divide_and_conquer_partition_dp(), idle_condition, queue_mutex, and tasks.
Referenced by TEST_F().
|
inlineprivate |
Worker thread main loop.
Definition at line 482 of file thread_pool.H.
References active_tasks, Aleph::and, condition, Aleph::divide_and_conquer_partition_dp(), idle_condition, queue_mutex, soft_limit_, space_available, stop, and tasks.
Referenced by start_workers().
|
private |
Definition at line 467 of file thread_pool.H.
Referenced by get_stats(), is_idle(), running_tasks(), wait_all_for(), wait_all_until(), and worker_loop().
|
private |
Notifies workers of new tasks.
Definition at line 463 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_bounded(), enqueue_bounded_detached(), enqueue_detached(), resize(), shutdown(), stop_workers(), and worker_loop().
|
private |
Definition at line 479 of file thread_pool.H.
Referenced by enqueue_detached(), and set_exception_callback().
|
private |
Exception threshold.
Definition at line 471 of file thread_pool.H.
Referenced by enqueue_bounded(), enqueue_bounded_detached(), get_queue_limits(), and set_queue_limits().
|
private |
Notifies wait_all() of idle state.
Definition at line 465 of file thread_pool.H.
Referenced by wait_all_for(), wait_all_until(), and worker_loop().
|
private |
Definition at line 476 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_detached(), get_stats(), and reset_stats().
|
mutableprivate |
Definition at line 462 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_bounded(), enqueue_bounded_detached(), enqueue_detached(), get_queue_limits(), get_stats(), is_idle(), pending_tasks(), resize(), set_exception_callback(), set_queue_limits(), shutdown(), stop_workers(), try_enqueue(), try_enqueue_detached(), wait_all_for(), wait_all_until(), and worker_loop().
|
private |
Block threshold.
Definition at line 470 of file thread_pool.H.
Referenced by enqueue_bounded(), enqueue_bounded_detached(), get_queue_limits(), set_queue_limits(), try_enqueue(), try_enqueue_detached(), and worker_loop().
|
private |
Notifies enqueuers of queue space.
Definition at line 464 of file thread_pool.H.
Referenced by enqueue_bounded(), enqueue_bounded_detached(), and worker_loop().
Definition at line 466 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_bounded(), enqueue_bounded_detached(), enqueue_detached(), is_stopped(), resize(), shutdown(), stop_workers(), try_enqueue(), try_enqueue_detached(), and worker_loop().
|
private |
Definition at line 461 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_bounded(), enqueue_bounded_detached(), enqueue_detached(), get_stats(), is_idle(), pending_tasks(), try_enqueue(), try_enqueue_detached(), wait_all_for(), wait_all_until(), and worker_loop().
|
private |
Definition at line 474 of file thread_pool.H.
Referenced by enqueue(), enqueue_batch(), enqueue_detached(), get_stats(), and reset_stats().
|
private |
Definition at line 475 of file thread_pool.H.
Referenced by enqueue_detached(), get_stats(), and reset_stats().
|
private |
Definition at line 460 of file thread_pool.H.
Referenced by get_stats(), num_threads(), resize(), shutdown(), start_workers(), and stop_workers().