Searched refs:ThreadPool (Results 1 – 14 of 14) sorted by relevance
20 static ThreadPool* g_threadPool = nullptr;23 ThreadPool* ThreadPool::CreateThreadPool(int number) in CreateThreadPool()33 g_threadPool = new ThreadPool(); in CreateThreadPool()38 void ThreadPool::Destroy() in Destroy()48 void ThreadPool::Init(int32_t numberThread) in Init()60 workers_.emplace_back(std::thread(ThreadPool::ThreadExecute, this, threadIndex)); in Init()64 void ThreadPool::ThreadRun(int32_t threadIndex) in ThreadRun()78 ThreadPool::~ThreadPool() in ~ThreadPool()94 void ThreadPool::AddTask(Task &&task) in AddTask()101 void ThreadPool::AddNewTask(Task &&task) in AddNewTask()[all …]
35 class ThreadPool {37 static ThreadPool* CreateThreadPool(int32_t number);57 ((ThreadPool*)context)->ThreadRun(threadIndex); in ThreadExecute()60 ThreadPool() in ThreadPool() function63 ~ThreadPool();
42 ThreadPoolUnitTest() : threadPool_(ThreadPool::CreateThreadPool(MAX_TASK_NUMBER)) {} in ThreadPoolUnitTest()46 ThreadPool::Destroy(); in ~ThreadPoolUnitTest()65 ThreadPool::AddTask(std::move(task)); in TestThreadPoolCreate()75 ThreadPool* threadPool_;
47 OHOS::ThreadPool notifyTokenWorker_;
96 OHOS::ThreadPool tokenDataWorker_;
43 OHOS::ThreadPool pool_;
66 ThreadPool::Destroy(); in ~ScriptManagerImpl()89 threadPool_ = ThreadPool::CreateThreadPool(MAX_PRIORITY); in Init()231 ThreadPool::AddTask(std::move(task)); in ExecuteScript()
51 ThreadPool *threadPool_ = nullptr;
74 OHOS::ThreadPool readRecordBufferTaskWorker_;
113 OHOS::ThreadPool deleteTaskWorker_;
1[==========] Running 25 tests from 7 test ...