src/threadpool.cc
ThreadPool::ThreadPool() : terminated_(false) {
  auto thread_counts(std::max(std::thread::hardware_concurrency(), 
                     (unsigned int)1));
  try {
    for (unsigned int i = 0; i < thread_counts; i++) {
      threads_.push_back(std::thread(&ThreadPool::WorkerThread, this));
    }
  } catch (...) {
    terminated_.store(true);
  }
}
// Initialize the threadpool by starting a number of threads 
Initialize the threadpool by starting a number of threads
Initialize the threadpool by starting a number of threads
ThreadPool::ThreadPool() : terminated_(false) {
  auto thread_counts(std::max(std::thread::hardware_concurrency(), 
                     (unsigned int)1));
  try {
    for (unsigned int i = 0; i < thread_counts; i++) {
      threads_.push_back(std::thread(&ThreadPool::WorkerThread, this));
    }
  } catch (...) {
    terminated_.store(true);
  }
}
ThreadPool :: ThreadPool ( ) : terminated_ ( false ) { auto thread_counts ( std :: max ( std :: thread :: hardware_concurrency ( ) , ( unsigned int ) 1 ) ) ; try { for ( unsigned int i = 0 ; i < thread_counts ; i ++ ) { threads_ . push_back ( std :: thread ( & ThreadPool :: WorkerThread , this ) ) ; } } catch ( ... ) { terminated_ . store ( true ) ; } }
Initialize the threadpool by starting a number of threads
Initialize the threadpool by starting a number of threads