/ohos5.0/foundation/ai/ai_engine/services/common/platform/threadpool/source/ |
H A D | thread_pool.cpp | 23 std::mutex ThreadPool::mutex_; 24 ThreadPool *ThreadPool::instance_ = nullptr; 26 ThreadPool *ThreadPool::GetInstance() in GetInstance() 33 AIE_NEW(instance_, ThreadPool); in GetInstance() 38 void ThreadPool::ReleaseInstance() in ReleaseInstance() 45 ThreadPool::ThreadPool() in ThreadPool() function in OHOS::AI::ThreadPool 50 ThreadPool::~ThreadPool() in ~ThreadPool() 55 void ThreadPool::SetStackSize(size_t size) in SetStackSize() 60 int ThreadPool::getStackSize() in getStackSize() 65 std::shared_ptr<Thread> ThreadPool::Pop() in Pop() [all …]
|
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/src/base/task_manager/ |
H A D | thread_pool.cpp | 25 std::unique_ptr<ThreadPool> ThreadPool::Create(const std::string& name, uint32_t numThreads) in Create() 34 ThreadPool::ThreadPool(const std::string& name, uint32_t numThreads) in ThreadPool() function in OHOS::CameraStandard::DeferredProcessing::ThreadPool 44 ThreadPool::~ThreadPool() in ~ThreadPool() 58 void ThreadPool::Initialize() in Initialize() 88 void ThreadPool::BeginBackgroundTasks() const in BeginBackgroundTasks() 96 void ThreadPool::EndBackgroundTasks() const in EndBackgroundTasks() 104 void ThreadPool::SetThreadPoolPriority(int priority) in SetThreadPoolPriority() 112 int ThreadPool::GetThreadPoolPriority() const in GetThreadPoolPriority() 117 void ThreadPool::PrintThreadInfo() in PrintThreadInfo() 132 ThreadPool::Task ThreadPool::GetTask() const in GetTask() [all …]
|
/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | thread_pool.cpp | 25 ThreadPool::ThreadPool(const std::string& name) in ThreadPool() function in OHOS::ThreadPool 30 ThreadPool::~ThreadPool() in ~ThreadPool() 37 uint32_t ThreadPool::Start(int numThreads) in Start() 61 void ThreadPool::Stop() in Stop() 74 void ThreadPool::AddTask(const Task &f) in AddTask() 89 size_t ThreadPool::GetCurTaskNum() in GetCurTaskNum() 96 ThreadPool::Task ThreadPool::ScheduleTask() in ScheduleTask() 115 bool ThreadPool::Overloaded() const in Overloaded() 120 void ThreadPool::WorkInThread() in WorkInThread()
|
/ohos5.0/foundation/communication/netstack/utils/common_utils/include/ |
H A D | thread_pool.h | 26 …te <typename Task, const size_t DEFAULT_THREAD_NUM, const size_t MAX_THREAD_NUM> class ThreadPool { 31 ThreadPool() = delete; 36 ThreadPool(const ThreadPool &) = delete; 41 ThreadPool &operator=(const ThreadPool &) = delete; 46 ThreadPool(ThreadPool &&) = delete; 51 ThreadPool &operator=(ThreadPool &&) = delete; 57 explicit ThreadPool(uint32_t timeout) : timeout_(timeout), idleThreadNum_(0), needRun_(true) in ThreadPool() function 67 ~ThreadPool() in ~ThreadPool()
|
/ohos5.0/base/update/updater/services/script/threadpool/ |
H A D | threadpool.cpp | 22 static ThreadPool* g_threadPool = nullptr; 35 ThreadPool* ThreadPool::CreateThreadPool(int number) in CreateThreadPool() 41 g_threadPool = new ThreadPool(); in CreateThreadPool() 46 void ThreadPool::Destroy() in Destroy() 56 void ThreadPool::Init(int32_t number) in Init() 74 void ThreadPool::ThreadRun(int32_t threadIndex) in ThreadRun() 88 ThreadPool::~ThreadPool() in ~ThreadPool() 104 void ThreadPool::AddTask(Task &&task) in AddTask() 111 void ThreadPool::AddNewTask(Task &&task) in AddNewTask() 125 int32_t ThreadPool::AcquireWorkIndex() in AcquireWorkIndex() [all …]
|
H A D | thread_pool.h | 38 class ThreadPool { 40 static ThreadPool* CreateThreadPool(int32_t number); 60 ((ThreadPool*)context)->ThreadRun(threadIndex); in ThreadExecute() 63 ThreadPool() in ThreadPool() function 66 ~ThreadPool();
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/threading/ |
H A D | task_queue_factory.cpp | 137 class ThreadPool final : public IThreadPool { class 139 explicit ThreadPool(size_t threadCount) in ThreadPool() function in __anondcf869ec0110::ThreadPool 148 context.thread = std::thread(&ThreadPool::ThreadProc, this, std::ref(context)); in ThreadPool() 152 ThreadPool(const ThreadPool&) = delete; 153 ThreadPool(ThreadPool&&) = delete; 154 ThreadPool& operator=(const ThreadPool&) = delete; 155 ThreadPool& operator=(ThreadPool&&) = delete; 222 ~ThreadPool() final in ~ThreadPool() 408 return IThreadPool::Ptr { new ThreadPool(threadCount) }; in CreateThreadPool()
|
/ohos5.0/foundation/ai/ai_engine/services/common/platform/threadpool/include/ |
H A D | thread_pool.h | 30 class ThreadPool { 31 FORBID_COPY_AND_ASSIGN(ThreadPool); 32 FORBID_CREATE_BY_SELF(ThreadPool); 36 static ThreadPool *GetInstance(); 68 static ThreadPool *instance_;
|
H A D | thread.h | 128 class ThreadPool; variable 130 friend class ThreadPool; variable
|
/ohos5.0/foundation/communication/ipc/ipc/native/c/manager/include/ |
H A D | ipc_thread_pool.h | 55 } ThreadPool; typedef 57 ThreadPool *InitThreadPool(int32_t maxThreadNum); 59 void DeinitThreadPool(ThreadPool *threadPool); 61 int32_t SpawnNewThread(ThreadPool *threadPool, int32_t policy, int32_t proto); 67 void UpdateMaxThreadNum(ThreadPool *threadPool, int32_t maxThreadNum);
|
/ohos5.0/foundation/ai/ai_engine/test/common/threadpool/ |
H A D | thread_pool_test.cpp | 164 ThreadPool *threadPool = ThreadPool::GetInstance(); 181 ThreadPool *threadPool = ThreadPool::GetInstance(); 197 ThreadPool *threadPool = ThreadPool::GetInstance(); 217 ThreadPool *threadPool = ThreadPool::GetInstance();
|
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/include/base/task_manager/ |
H A D | thread_pool.h | 33 class ThreadPool { 37 static std::unique_ptr<ThreadPool> Create(const std::string& name, uint32_t numThreads); 38 ~ThreadPool(); 74 friend std::unique_ptr<ThreadPool> std::make_unique<ThreadPool>(const std::string&, uint32_t&); 75 ThreadPool(const std::string& name, uint32_t numThreads);
|
H A D | task_registry.h | 34 TaskRegistry(const std::string& name, const ThreadPool* threadPool); 47 const ThreadPool* threadPool_;
|
/ohos5.0/foundation/communication/ipc/ipc/native/c/manager/src/ |
H A D | ipc_thread_pool.c | 65 ThreadPool *threadPool = GetCurrentSkeleton()->threadPool; in ThreadContextDestructor() 109 ThreadPool *InitThreadPool(int32_t maxThreadNum) in InitThreadPool() 111 ThreadPool *threadPool = (ThreadPool*)calloc(1, sizeof(ThreadPool)); in InitThreadPool() 126 void DeinitThreadPool(ThreadPool *threadPool) in DeinitThreadPool() 141 int32_t SpawnNewThread(ThreadPool *threadPool, int32_t policy, int32_t proto) in SpawnNewThread() 184 void UpdateMaxThreadNum(ThreadPool *threadPool, int32_t maxThreadNum) in UpdateMaxThreadNum()
|
/ohos5.0/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_thread_pool_test.cpp | 67 ThreadPool pool; 76 ThreadPool pool("test_02_pool"); 85 ThreadPool pool("test_02_pool"); 95 ThreadPool pool; 122 ThreadPool pool; 150 ThreadPool pool; 200 ThreadPool pool; 235 ThreadPool pool; 292 ThreadPool pool(poolName);
|
/ohos5.0/commonlibrary/c_utils/base/test/benchmarktest/thread_pool_benchmark_test/ |
H A D | thread_pool_benchmark_test.cpp | 66 ThreadPool pool; in BENCHMARK_F() 85 ThreadPool pool("test_02_pool"); in BENCHMARK_F() 105 ThreadPool pool("test_02_pool"); in BENCHMARK_F() 127 ThreadPool pool; in BENCHMARK_F() 158 static void AddPoolTaskByForLoop(ThreadPool& pool, const int loopIterations, void(*p)(int&)) in AddPoolTaskByForLoop() 178 ThreadPool pool; in BENCHMARK_F() 214 ThreadPool pool; in BENCHMARK_F() 270 ThreadPool pool; in BENCHMARK_F() 316 ThreadPool pool; in BENCHMARK_F() 382 ThreadPool pool(poolName); in BENCHMARK_F()
|
/ohos5.0/base/update/updater/test/unittest/script/ |
H A D | threadpool_unittest.cpp | 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_;
|
/ohos5.0/commonlibrary/c_utils/docs/zh-cn/ |
H A D | c_utils_thread_pool.md | 15 ### OHOS::ThreadPool 19 | | **ThreadPool**(const std::string& name = std::string())<br>构造ThreadPool。为线程池内线程命名。 | 20 | | **~ThreadPool**() override |
|
/ohos5.0/commonlibrary/c_utils/docs/en/ |
H A D | c_utils_thread_pool.md | 15 ### OHOS::ThreadPool 19 | | **ThreadPool**(const std::string& name = std::string())<br>Construct ThreadPool. Name the threa… 20 | | **~ThreadPool**() override | 24 | std::string | **GetName**() const<br>Get the name of ThreadPool. | 28 | void | **Stop**()<br>Stop ThreadPool and waiting all threads in pool to stop. |
|
/ohos5.0/commonlibrary/c_utils/base/include/ |
H A D | thread_pool.h | 36 class ThreadPool : public NoCopyable { 51 explicit ThreadPool(const std::string &name = std::string()); 52 ~ThreadPool() override;
|
/ohos5.0/foundation/ai/ai_engine/services/server/communication_adapter/source/ |
H A D | client_listener_handler.cpp | 156 ThreadPool *threadPool = ThreadPool::GetInstance(); in StartAsyncProcessThread() 188 ThreadPool *threadPool = ThreadPool::GetInstance(); in StopAsyncProcessThread()
|
/ohos5.0/base/security/security_guard/frameworks/common/task_handler/include/ |
H A D | task_handler.h | 35 OHOS::ThreadPool pool_; 36 OHOS::ThreadPool minorsPool_;
|
/ohos5.0/foundation/ai/ai_engine/services/client/communication_adapter/source/ |
H A D | sa_client_adapter.cpp | 128 ThreadPool *threadPool = ThreadPool::GetInstance(); in InitAiServer() 160 ThreadPool *threadPool = ThreadPool::GetInstance(); in CloseAiServer()
|
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/include/base/task_manager/task_group/ |
H A D | base_task_group.h | 34 … BaseTaskGroup(const std::string& name, TaskFunc func, bool serial, const ThreadPool* threadPool); 53 const ThreadPool* threadPool_;
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/native/soundpool/ |
H A D | stream_id_manager.h | 91 std::unique_ptr<ThreadPool> streamPlayingThreadPool_; 93 std::shared_ptr<ThreadPool> cacheBufferStopThreadPool_;
|