Lines Matching refs:g_threadPool
22 static ThreadPool* g_threadPool = nullptr; variable
38 if (g_threadPool != nullptr) { in CreateThreadPool()
39 return g_threadPool; in CreateThreadPool()
41 g_threadPool = new ThreadPool(); in CreateThreadPool()
42 g_threadPool->Init(number); in CreateThreadPool()
43 return g_threadPool; in CreateThreadPool()
48 if (g_threadPool == nullptr) { in Destroy()
52 delete g_threadPool; in Destroy()
53 g_threadPool = nullptr; in Destroy()
106 if (g_threadPool != nullptr) { in AddTask()
107 g_threadPool->AddNewTask(std::move(task)); in AddTask()