2 ms·
Windows includes reasonably good thread pools as a part of the OS, the API is SubmitThreadpoolWork. macOS too, the API is dispatch_async.
by Const-me 6y ago
Windows includes reasonably good thread pools as a part of the OS, the API is SubmitThreadpoolWork.
macOS too, the API is dispatch_async.
- Const-me 6y agoFor completeness, modern C and C++ compilers ship yet another thread pool, in OpenMP language extension. I sometimes write my own threading support for unusual use cases, but that’s hard to do correctly even with experience. For this reason, in 80% of cases I pick an off-the-shelf implementation instead of doing my own.