Thread pooling in C++11

This is copied from my answer to another very similar post: Start with maximum number of threads the system can support:int num_threads = std::thread::hardware_concurrency(); For an efficient threadpool implementation, once threads are created according to num_threads, it’s better not to create new ones, or destroy old ones (by joining). There will be a performance penalty, an … Read more