|
asynchrony 0.0.0
Add asynchrony to your C++ applications using standard C++20
|
Implements a lock-free round robin work allocation into vector of simple_worker<T>. More...
#include </opt/azure-agent/_work/14/s/include/siddiqsoft/roundrobin_pool.hpp>
Public Member Functions | |
| roundrobin_pool (roundrobin_pool &&)=delete | |
| auto | operator= (roundrobin_pool &&)=delete |
| roundrobin_pool (roundrobin_pool &)=delete | |
| auto | operator= (roundrobin_pool &)=delete |
| roundrobin_pool (std::function< void(T &&)> c) | |
| Consturcts a deque of simple_worker<T> with the given callback. | |
| void | queue (T &&item) |
| Queue item into one of the thread's queue. | |
Implements a lock-free round robin work allocation into vector of simple_worker<T>.
| T | Your datatype #tparam N Number of threads in the pool. Leave it to 0 to use the value returned by std::thread::hardware_concurrency() |
Definition at line 53 of file roundrobin_pool.hpp.
|
inline |
Consturcts a deque of simple_worker<T> with the given callback.
| c | Callback worker function |
Definition at line 64 of file roundrobin_pool.hpp.
|
inline |
Queue item into one of the thread's queue.
| item | The item must be std::move'd |
Definition at line 82 of file roundrobin_pool.hpp.