MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / ThreadPool

Method ThreadPool

core/src/core/thread_pool.cpp:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23// --------------------------------------------------------------------------------------------------------------------
24
25ThreadPool::ThreadPool(int numThreads)
26 : mThreads(numThreads)
27 , mCancel(false)
28 , mReady(0)
29 , mCompleted(0)
30 , mJobsCompleted(0)
31 , mQuit(false)
32 , mJobGraph(nullptr)
33{
34 for (auto i = 0; i < numThreads; ++i)
35 {
36 mThreads[i] = std::move(std::thread(&ThreadPool::threadFunc, this, i));
37 }
38}
39
40ThreadPool::~ThreadPool()
41{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected