MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / getThreadPool

Method getThreadPool

src/share/WizThreads.cpp:620–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618 }
619public:
620 static IWizThreadPool* getThreadPool(int threadID, int threadCount = 1)
621 {
622 QMutex& cs = GetCriticalSection();
623 QMutexLocker lock(&cs);
624 //
625 std::map<int, IWizThreadPool*>& threads = GetThreads();
626 //
627 std::map<int, IWizThreadPool*>::const_iterator it = threads.find(threadID);
628 if (it != threads.end())
629 return it->second;
630 //
631 if (threadID == WIZ_THREAD_MAIN)
632 {
633 IWizThreadPool* pool = GetMainThreadPool();
634 threads[threadID] = pool;
635 return pool;
636 }
637 //
638 IWizThreadPool* pool = ::WizCreateThreadPool(threadCount);
639 threads[threadID] = pool;
640 return pool;
641 }
642 //
643
644 static void ClearThreadPool()

Callers

nothing calls this directly

Calls 3

WizCreateThreadPoolFunction · 0.85
endMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected