| 618 | } |
| 619 | public: |
| 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() |
nothing calls this directly
no test coverage detected