33 #include "../checks.h"
43 : initialized_(
false), thread_pool_size_(0) {}
47 LockGuard<Mutex> guard(&lock_);
50 for (std::vector<WorkerThread*>::iterator i = thread_pool_.begin();
51 i != thread_pool_.end(); ++i) {
59 LockGuard<Mutex> guard(&lock_);
60 ASSERT(thread_pool_size >= 0);
61 if (thread_pool_size < 1)
62 thread_pool_size = CPU::NumberOfProcessorsOnline();
63 thread_pool_size_ =
Max(
Min(thread_pool_size, kMaxThreadPoolSize), 1);
68 LockGuard<Mutex> guard(&lock_);
69 if (initialized_)
return;
72 for (
int i = 0; i < thread_pool_size_; ++i)
#define ASSERT(condition)