inline void ThreadPool::AddThread(int count) { for (int i = 0; i < count; i++) { TaskThread* thread = new TaskThread(queue); thread->Start(); threads.push_back(thread); histThread++; } }
inline void ThreadPool::Priority(Task* t) { if (queue.Priority(t)) { TaskThread* thread = new TaskThread(queue); thread->Start(); thread->SetStop(); stopThreads.push_back(thread); histThread++; } }