Ejemplo n.º 1
0
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++;
    }
}
Ejemplo n.º 2
0
inline void ThreadPool::Priority(Task* t)
{
    if (queue.Priority(t))
    {
        TaskThread* thread = new TaskThread(queue);
        thread->Start();
        thread->SetStop();
        stopThreads.push_back(thread);
        histThread++;
    }
}