Could anyone point me to a sample implementation of a thread pool in C++, please? I'm looking for a very basic one without too much complexity, which would be suitable for a beginner in threading to study.
Look at Intel's Thread Building Blocks. I don't know how well that library meets your "simple" criteria, but it seems to be very well thought-out and thorough. I would think that it would be worth the effort to learn if you want to do threading in C++.
Boost also has some threading facilities.
It may be worth to check out Qt's QThreadPool implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With