Esempio n. 1
0
aiThreadPool::aiThreadPool(size_t threads)
    : m_stop(false)
{
    for (size_t i = 0; i < threads; ++i) {
        m_workers.push_back(std::thread(aiWorkerThread(this)));
    }
}
Esempio n. 2
0
aiThreadPool::aiThreadPool(size_t threads)
    : m_stop(false)
{
    DebugLog("aiThreadPool: Starting %lu thread(s)", threads);

    for (size_t i = 0; i < threads; ++i)
    {
        m_workers.push_back(std::thread(aiWorkerThread(this)));
    }
}