MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / addThreads

Method addThreads

edrav2/iprj/libcore/src/threadpool.cpp:238–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236 //
237 //
238 Size addThreads(Size nThreadsCount)
239 {
240 std::scoped_lock lock(m_mtxThreads);
241 if (m_fStop)
242 error::InvalidUsage(FMT("The pool is being stopped <" << m_sName << ">")).throwException();
243 for (Size n = 0; n < nThreadsCount; ++n)
244 m_threads.push_back(std::thread(&Impl::startPoolThread, this));
245 return m_threads.size();
246 }
247
248 //
249 //

Callers

nothing calls this directly

Calls 4

throwExceptionMethod · 0.80
threadFunction · 0.50
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected