Home
last modified time | relevance | path

Searched refs:Worker (Results 1 - 13 of 13) sorted by relevance

/commonlibrary/ets_utils/js_concurrent_module/taskpool/
H A Dworker.cpp34 Worker::PriorityScope::PriorityScope(Worker* worker, Priority taskPriority) : worker_(worker) in PriorityScope()
51 Worker::RunningScope::~RunningScope() in ~RunningScope()
61 Worker* Worker::WorkerConstructor(napi_env env) in WorkerConstructor()
64 Worker* worker = new Worker(env); in WorkerConstructor()
69 void Worker::CloseHandles() in CloseHandles()
84 void Worker::ReleaseWorkerHandles(const uv_async_t* req) in ReleaseWorkerHandles()
86 auto worker = static_cast<Worker*>(re in ReleaseWorkerHandles()
[all...]
H A Dworker.h54 class Worker { class
58 static Worker* WorkerConstructor(napi_env env);
90 explicit Worker(napi_env env) : hostEnv_(env) {}; in Worker() function in Commonlibrary::Concurrent::TaskPoolModule::Worker
92 ~Worker() = default;
94 Worker(const Worker &) = delete;
95 Worker& operator=(const Worker &) = delete;
96 Worker(Worker
[all...]
H A Dtask_manager.h72 void NotifyWorkerIdle(Worker* worker);
73 void NotifyWorkerCreated(Worker* worker);
74 void NotifyWorkerRunning(Worker* worker);
75 void RemoveWorker(Worker* worker);
76 void RestoreWorker(Worker* worker);
130 void StoreLongTaskInfo(uint64_t taskId, Worker* worker);
133 Worker* GetLongTaskInfo(uint64_t taskId);
160 void NotifyWorkerAdded(Worker* worker);
200 std::unordered_map<uint64_t, Worker*> longTasksMap_ {};
203 std::unordered_set<Worker*> workers
[all...]
H A Dtask_manager.cpp438 auto iter = std::find_if(idleWorkers_.begin(), idleWorkers_.end(), [](Worker *worker) { in TriggerShrink()
655 void TaskManager::NotifyWorkerIdle(Worker* worker) in NotifyWorkerIdle()
670 void TaskManager::NotifyWorkerCreated(Worker* worker) in NotifyWorkerCreated()
675 void TaskManager::NotifyWorkerAdded(Worker* worker) in NotifyWorkerAdded()
682 void TaskManager::NotifyWorkerRunning(Worker* worker) in NotifyWorkerRunning()
873 auto worker = Worker::WorkerConstructor(env); in CreateWorkers()
879 void TaskManager::RemoveWorker(Worker* worker) in RemoveWorker()
887 void TaskManager::RestoreWorker(Worker* worker) in RestoreWorker()
973 Worker* worker = static_cast<Worker*>(tas in NotifyCallbackExecute()
[all...]
H A Dtask.h47 class Worker;
236 Worker* worker;
/commonlibrary/ets_utils/js_concurrent_module/worker/
H A Dworker.cpp32 static std::list<Worker *> g_workers;
36 static std::list<Worker *> g_limitedworkers;
45 std::shared_ptr<OHOS::AppExecFwk::EventHandler> Worker::GetMainThreadHandler() in GetMainThreadHandler()
60 Worker::Worker(napi_env env, napi_ref thisVar) in Worker() function in Commonlibrary::Concurrent::WorkerModule::Worker
64 napi_value Worker::InitWorker(napi_env env, napi_value exports) in InitWorker()
85 napi_define_class(env, threadWorkerName, sizeof(threadWorkerName), Worker::ThreadWorkerConstructor, nullptr, in InitWorker()
89 // for worker.Worker in InitWorker()
90 const char workerName[] = "Worker"; in InitWorker()
92 napi_define_class(env, workerName, sizeof(workerName), Worker in InitWorker()
[all...]
H A Dnative_module_worker.cpp25 .nm_register_func = Commonlibrary::Concurrent::WorkerModule::Worker::InitWorker,
H A Dworker.h38 class Worker { class
101 Worker(napi_env env, napi_ref thisVar);
104 * The destructor of the Worker.
106 ~Worker();
522 static bool IsValidWorker(Worker* worker);
/commonlibrary/ets_utils/js_concurrent_module/worker/test/
H A Dtest_worker.cpp92 Worker *worker = static_cast<Worker*>(req->data); in WorkerOnMessage()
124 Worker *worker = static_cast<Worker*>(req->data); in HostOnMessage()
145 auto worker = reinterpret_cast<Worker*>(data); in WorkerThreadFunction()
161 static void UpdateMainThreadWorkerFlag(Worker *worker, bool isMainThreadWorker) in UpdateMainThreadWorkerFlag()
166 static void InitHostHandle(Worker *worker, uv_loop_t *loop) in InitHostHandle()
173 static void PostMessage(Worker *worker, void *message) in PostMessage()
178 static void UpdateWorkerState(Worker *worker, Worker
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Dworker.rs32 pub(crate) worker: Arc<Worker>,
91 pub(crate) fn run_worker(worker: Arc<Worker>, handle: Arc<Handle>) {
123 pub(crate) struct Worker {
131 unsafe impl Send for Worker {}
132 unsafe impl Sync for Worker {}
134 impl Worker { impls
205 /// Gets Worker's Inner with ptr.
257 fn check_cancel(&mut self, worker: &Worker) { in check_cancel()
264 fn periodic_check(&mut self, worker: &Worker) { in periodic_check()
H A Dasync_pool.rs26 use super::worker::{get_current_ctx, run_worker, Worker};
385 workers: Mutex<Vec<Arc<Worker>>>,
392 fn async_thread_proc(inner: Arc<Inner>, worker: Arc<Worker>, handle: Arc<Handle>) { in async_thread_proc()
441 workers.push(Arc::new(Worker { in create_async_thread_pool()
597 pub(crate) fn get_worker(&self, index: usize) -> Result<Arc<Worker>, ()> {
/commonlibrary/ets_utils/js_concurrent_module/taskpool/test/
H A Dtest.cpp197 Worker* worker = reinterpret_cast<Worker*>(WorkerConstructor(env)); in CheckForBlockedWorkers()
235 Worker* worker = reinterpret_cast<Worker*>(WorkerConstructor(env)); in TriggerShrink()
271 Worker* worker1 = reinterpret_cast<Worker*>(WorkerConstructor(env)); in NotifyShrink()
272 Worker* worker2 = reinterpret_cast<Worker*>(WorkerConstructor(env)); in NotifyShrink()
311 Worker* worker = reinterpret_cast<Worker*>(WorkerConstructo in TryExpand()
[all...]
H A Dtest_taskpool.cpp131 Worker* worker = reinterpret_cast<Worker*>(NativeEngineTest::WorkerConstructor(env)); in HWTEST_F()
147 Worker* worker = reinterpret_cast<Worker*>(NativeEngineTest::WorkerConstructor(env)); in HWTEST_F()
527 Worker* worker = reinterpret_cast<Worker*>(NativeEngineTest::WorkerConstructor(env)); in HWTEST_F()
968 auto worker = reinterpret_cast<Worker*>(NativeEngineTest::WorkerConstructor(env)); in HWTEST_F()
997 auto worker = reinterpret_cast<Worker*>(NativeEngineTest::WorkerConstructor(env)); in HWTEST_F()
2046 Worker* worker = reinterpret_cast<Worker*>(NativeEngineTes in HWTEST_F()
[all...]

Completed in 21 milliseconds