thread-pool
thread-pool copied to clipboard
A modern, fast, lightweight thread pool library based on C++20
> **Note** > This is on hold until I can ensure that the necessary build flags are properly set in the `dp::thread-pool` for coroutine support. It seems that down-stream projects...
Currently, the thread pool will eventually deadlock if a user launches a tasks that recursively creates new tasks on the thread pool wait for a result. Sample code: ```cpp //...
When using the library from vcpkg along with VIsual Studio, the include path has to be added manually which should not be necessary. Most of the vcpkg libraries have their...
WIP 🚧 Adds a implementation of a Chase-Lev work stealing queue as described in the corresponding paper: "Correct and Efficient Work-Stealing for Weak Memory Models" and "Dynamic Circular Work-Stealing Deque"...
Stuck in ~thread_pool() => threads_[i].join(); 145 pthread_join_common.c: No such file or directory. #0 __pthread_clockjoin_ex (threadid=281473323018496, thread_return=0x0, clockid=0, abstime=, block=) at pthread_join_common.c:145 #1 0x0000aaaaaadded30 in std::thread::join() () #2 0x0000aaaaaabba198 in std::jthread::join()...
See [this](https://www.reddit.com/r/cpp/comments/15h5yus/comment/juqtxrp/?utm_source=share&utm_medium=web2x&context=3) discussion for context. Basically, in it's current state, the library is limiting itself to 1 processor group with a max of 64 logical cores.
When passing in a task to the thread pool, it would be good to set the priority for the task. This could be a number or score, or we could...
Fixes #23
[`std::atomic_flag`](https://en.cppreference.com/w/cpp/atomic/atomic_flag) is the only atomic primitive guaranteed to be lock free. It would be interesting to see if this has any positive impact on performance over `std::binary_semaphore`.
If we're going to support multiple platforms, it would be good to ensure that we have the same behavior on all platforms as much as possible. On macOS, the stack...