/foundation/ai/intelligent_voice_framework/utils/ |
H A D | thread_wrapper.cpp | 30 if (thread_ != nullptr) { in Start() 37 thread_ = std::make_unique<ffrt::thread>(name.c_str(), Convert2FfrtQos(qos), &ThreadWrapper::RunInThread, this); in Start() 40 thread_ = std::make_unique<std::thread>(&ThreadWrapper::RunInThread, this); in Start() 43 if (thread_ == nullptr) { in Start() 49 pthread_setname_np(thread_->native_handle(), name.c_str()); in Start() 57 if (thread_ == nullptr) { in Join() 60 if (thread_->joinable()) { in Join() 62 thread_->join(); in Join() 65 thread_.reset(); in Join()
|
/foundation/filemanagement/dfs_service/utils/system/include/ |
H A D | dfsu_thread.h | 44 if (thread_ != nullptr) { in Run() 48 thread_ = std::make_unique<std::thread>(std::forward<Fn>(Fx), std::forward<Args>(Ax)...); in Run() 55 if (thread_ != nullptr) { in RunLoop() 59 thread_ = std::make_unique<std::thread>([this, task, interval, retryTimes] { in RunLoop() 79 if (thread_ != nullptr) { in RunLoopFlexible() 83 thread_ = std::make_unique<std::thread>([this, task, interval, retryTimes] { in RunLoopFlexible() 104 if (thread_ == nullptr) { in Stop() 113 if (thread_->joinable()) { in Stop() 114 thread_->join(); in Stop() 116 thread_ in Stop() [all...] |
/foundation/ability/ability_runtime/test/unittest/appkit/child_main_thread_first_test/ |
H A D | child_main_thread_first_test.cpp | 51 sptr<ChildMainThread> thread_; member in OHOS::AppExecFwk::ChildMainThreadFirstTest 63 thread_ = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); in SetUp() 88 ASSERT_NE(thread_, nullptr); in HWTEST_F() 92 thread_->mainHandler_ = handler; in HWTEST_F() 93 thread_->processInfo_ = std::make_shared<ChildProcessInfo>(); in HWTEST_F() 95 auto ret = thread_->ScheduleLoadChild(); in HWTEST_F() 108 ASSERT_NE(thread_, nullptr); in HWTEST_F() 109 auto ret = thread_->ScheduleLoadChild(); in HWTEST_F() 122 ASSERT_NE(thread_, nullptr); in HWTEST_F() 125 thread_ in HWTEST_F() [all...] |
/foundation/ai/ai_engine/services/common/platform/threadpool/source/ |
H A D | thread.cpp | 26 IWorker::IWorker() : counter_(0), thread_(nullptr), status_(IDLE) in IWorker() 32 thread_ = nullptr; in ~IWorker() 37 CHK_RET(thread_ == nullptr, RETCODE_FAILURE); in GetThreadId() 38 return thread_->GetThreadId(); in GetThreadId() 44 InitThread(thread_); in Thread() 103 int retCode = CreateOneThread(thread_, pattr, Thread::ThreadProc, this); in StartThread() 211 return GetThreadIdUnix(thread_); in GetThreadId() 229 (void)WaitThread(thread_); in WaitForEnd()
|
/foundation/multimedia/player_framework/services/utils/ |
H A D | watchdog.cpp | 44 thread_ = std::make_unique<std::thread>([this] () -> void { this->WatchDogThread(); }); in EnableWatchDog() 57 if (thread_ != nullptr && thread_->joinable()) { in DisableWatchDog() 58 thread_->join(); in DisableWatchDog() 59 thread_.reset(); in DisableWatchDog() 60 thread_ = nullptr; in DisableWatchDog()
|
H A D | task_queue.cpp | 39 CHECK_AND_RETURN_RET_LOG(thread_ == nullptr, in Start() 42 thread_ = std::make_unique<std::thread>(&TaskQueue::TaskProcessor, this); in Start() 57 if (std::this_thread::get_id() == thread_->get_id()) { 65 std::swap(thread_, t);
|
/foundation/communication/nfc/services/src/utils/ |
H A D | nfc_watch_dog.cpp | 23 : threadName_(threadName), timeout_(timeout), canceled_(false), thread_(nullptr), nciNfccProxy_(nfccProxy)
in NfcWatchDog() 29 if (thread_ && thread_->joinable()) {
in ~NfcWatchDog() 31 thread_->join();
in ~NfcWatchDog() 65 thread_ = std::make_unique<std::thread>([this]() { this->MainLoop(); });
in Run()
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/util/ |
H A D | dispatcher.cpp | 36 thread_ = std::make_unique<std::thread>(&Dispatcher::Run, this, std::move(startPromise)); in Initialize() 47 if (thread_ && thread_->joinable()) { in Uninitialize() 48 thread_->join(); in Uninitialize() 49 thread_ = nullptr; in Uninitialize()
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/ |
H A D | picture_manager_thread.cpp | 40 : thread_(nullptr),
in PictureManagerThread() 67 if (thread_ == nullptr) {
in Start() 68 thread_ = std::make_unique<std::thread>(&PictureManagerThread::Run, this);
in Start() 78 if (thread_ != nullptr) {
in Stop() 82 if (thread_->joinable()) {
in Stop() 83 thread_->join(); // wait for thread finished
in Stop() 85 thread_ = nullptr;
in Stop() 93 if (thread_ != nullptr) {
in Pause() 102 if (thread_ != nullptr) {
in Resume()
|
/foundation/ai/ai_engine/services/server/server_executor/source/ |
H A D | engine.cpp | 33 thread_(thread), in Engine() 90 bool isStarted = thread_->StartThread(&worker_); in Initialize() 102 if (thread_) { in Uninitialize() 103 thread_->StopThread(); in Uninitialize() 106 threadPool->Push(thread_); in Uninitialize() 107 thread_ = nullptr; in Uninitialize()
|
/foundation/resourceschedule/ffrt/src/eu/ |
H A D | worker_thread.h | 117 int ret = pthread_create(&thread_, &attr_, ThreadFunc, args); in Start() 124 ret = pthread_create(&thread_, &attr_, ThreadFunc, args); in Start() 137 pthread_join(thread_, nullptr); in Join() 145 pthread_detach(thread_); in Detach() 154 return this->thread_; in GetThread() 202 pthread_t thread_{0};
|
/foundation/multimedia/player_framework/services/services/monitor/server/ |
H A D | monitor_server.cpp | 44 if (thread_ != nullptr) { in ~MonitorServer() 45 if (thread_->joinable()) { in ~MonitorServer() 47 thread_->join(); in ~MonitorServer() 49 thread_.reset(); in ~MonitorServer() 50 thread_ = nullptr; in ~MonitorServer() 130 if (thread_ != nullptr) { in EnableMonitor() 131 if (thread_->joinable()) { in EnableMonitor() 132 thread_->join(); in EnableMonitor() 134 thread_.reset(); in EnableMonitor() 135 thread_ in EnableMonitor() [all...] |
/foundation/communication/netmanager_base/services/netconnmanager/src/ |
H A D | probe_thread.cpp | 65 if (thread_.joinable()) { in ~ProbeThread() 66 thread_.join(); in ~ProbeThread() 75 thread_ = std::thread([probeThead] { return NetProbeThread(probeThead);}); in Start() 77 pthread_setname_np(thread_.native_handle(), threadName.c_str()); in Start() 78 thread_.detach(); in Start()
|
/foundation/ai/ai_engine/services/common/platform/threadpool/include/ |
H A D | thread.h | 114 thread_ = thread; in SetThread() 122 Thread *thread_; member in OHOS::AI::IWorker 196 PthreadData thread_; member in OHOS::AI::Thread
|
/foundation/distributeddatamgr/preferences/frameworks/native/include/ |
H A D | executor.h | 59 : thread_([this, name] { in Executor() 66 thread_.detach(); 70 : thread_([this] { in Executor() 76 thread_.detach(); 136 std::thread thread_; member in OHOS::NativePreferences::Executor
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/sock/ |
H A D | socket_listener.cpp | 51 thread_ = std::make_unique<std::thread>(&SocketThread::OnListenEvents, this); in Initialize() 61 if (thread_ && thread_->joinable()) { in Uninitialize() 62 thread_->join(); in Uninitialize() 63 thread_ = nullptr; in Uninitialize()
|
/foundation/CastEngine/castengine_wifi_display/services/utils/ |
H A D | timeout_timer.cpp | 30 thread_ = std::make_unique<std::thread>(&TimeoutTimer::MainLoop, this); in TimeoutTimer() 31 pthread_setname_np(thread_->native_handle(), info.c_str()); in TimeoutTimer() 51 if (thread_->joinable()) { in ~TimeoutTimer() 52 thread_->join(); in ~TimeoutTimer()
|
/foundation/graphic/graphic_3d/lume/metaobject/src/ |
H A D | threaded_task_queue.cpp | 52 thread_ = std::thread([this]() { ProcessTasks(); }); 69 if (thread_.joinable()) { 70 thread_.join(); 125 std::thread thread_; member in ThreadedTaskQueue
|
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_client/unittest/pipeline/ |
H A D | rs_render_thread_test.cpp | 361 RSRenderThread::Instance().thread_ = nullptr; in HWTEST_F() 366 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F() 372 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F() 384 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F() 387 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F() 390 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F() 393 EXPECT_TRUE(RSRenderThread::Instance().thread_); in HWTEST_F()
|
/foundation/multimedia/player_framework/services/dfx/ |
H A D | dfx_log_dump.cpp | 37 thread_ = std::make_unique<std::thread>([this] () -> void { this->TaskProcessor(); }); in DfxLogDump() 47 if (thread_ != nullptr && thread_->joinable()) { in ~DfxLogDump() 48 thread_->join(); in ~DfxLogDump()
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/util/internal/ |
H A D | timer_linux.cpp | 51 std::unique_ptr<std::thread> thread_ {}; 64 thread_ = std::make_unique<std::thread>(&TimerManager::OnTimer, this, std::move(startPromise)); in TimerManager() 71 if (thread_ && thread_->joinable()) { in ~TimerManager() 72 thread_->join(); in ~TimerManager()
|
/foundation/multimodalinput/input/uinput/ |
H A D | hdf_device_event_manager.cpp | 42 thread_ = std::thread([this] { injectThread_.InjectFunc(); }); in ConnectHDFInit() 43 pthread_setname_np(thread_.native_handle(), name.c_str()); in ConnectHDFInit()
|
H A D | hdf_device_event_manager.h | 34 std::thread thread_; member in OHOS::MMI::HdfDeviceEventManager
|
/foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include/ |
H A D | executor.h | 56 : thread_([this] { in Executor() 62 thread_.detach(); 122 std::thread thread_; member in OHOS::Executor
|
/foundation/graphic/graphic_2d/rosen/modules/platform/eventhandler_impl/ |
H A D | event_runner.cpp | 90 if ((!thread_) && (needCreateThread_)) { in ReclaimCurrentThread() 92 thread_ = std::make_unique<std::thread>(&ThreadCollector::Run, this); in ReclaimCurrentThread() 153 if ((thread_) && (thread_->joinable())) { in Stop() 155 thread_->join(); in Stop() 227 std::unique_ptr<std::thread> thread_; member in OHOS::AppExecFwk::__anon9109::ThreadCollector 258 : collectorLock_(), condition_(), reclaims_(), depositMap_(), threadLock_(), thread_(nullptr) in ThreadCollector()
|