|
asynchrony 2.3.1
Add asynchrony to your C++ applications using standard C++20
|
Public Member Functions | |
| roundrobin_pool (roundrobin_pool &&)=delete | |
| Move constructor (deleted - pools are not movable). | |
| auto | operator= (roundrobin_pool &&)=delete |
| Move assignment operator (deleted - pools are not movable). | |
| roundrobin_pool (roundrobin_pool &)=delete | |
| Copy constructor (deleted - pools are not copyable). | |
| auto | operator= (roundrobin_pool &)=delete |
| Copy assignment operator (deleted - pools are not copyable). | |
| roundrobin_pool (std::function< void(T &&)> c) | |
| Constructs a round-robin thread pool. | |
| void | queue (T &&item) |
| Queue a work item for processing. | |
Definition at line 90 of file roundrobin_pool.hpp.
|
inline |
Constructs a round-robin thread pool.
Creates a deque of simple_worker<T> instances that will process work items using the provided callback function. Work items are distributed across workers using a round-robin algorithm.
| c | The worker callback function with signature void(T&&) Called for each item dequeued from a worker's queue |
Definition at line 123 of file roundrobin_pool.hpp.
|
inline |
Queue a work item for processing.
Adds an item to one of the worker's queues using round-robin distribution. The choice of worker is determined by the queue counter modulo the number of workers.
| item | The work item to queue (must be move-constructible) Ownership is transferred to the selected worker |
Definition at line 158 of file roundrobin_pool.hpp.