-ThrPool::ThrPool(int sz, bool blocking)
-: nthreads_(sz),blockadd_(blocking),jobq_(100*sz)
-{
- for (int i=0; i<nthreads_; i++)
- th_.push_back(std::thread(&ThrPool::do_worker, this));
+ThrPool::ThrPool(size_t sz, bool blocking)
+: nthreads_(sz),blockadd_(blocking),jobq_(100*sz) {
+ for (size_t i=0; i<nthreads_; i++)
+ th_.emplace_back(&ThrPool::do_worker, this);