Home
last modified time | relevance | path

Searched refs:callback (Results 1 – 25 of 33) sorted by relevance

12

/commonlibrary/ets_utils/js_concurrent_module/worker/
Dworker_runner.cpp21 WorkerRunner::WorkerRunner(WorkerStartCallback callback) : callback_(callback), selfThreadId_(uv_th… in WorkerRunner() argument
39 if (callback_.callback != nullptr) { in Run()
40 callback_.callback(callback_.data); in Run()
Dworker_runner.h29 : callback(function), data(dataArgs) in callback() function
32 CallbackFunction callback; member
49 explicit WorkerRunner(WorkerStartCallback callback);
Dworker_new.cpp347 napi_ref callback = NapiHelper::CreateReference(env, args[1], 1); in AddListener() local
348 auto listener = new WorkerListener(env, callback, mode); in AddListener()
400 napi_ref callback = nullptr; in RemoveListener() local
402 napi_create_reference(env, args[1], 1, &callback); in RemoveListener()
404 worker->RemoveListenerInner(env, typeStr, callback); in RemoveListener()
406 NapiHelper::DeleteReference(env, callback); in RemoveListener()
412 napi_value callback = nullptr; in NewCallWorkCallback() local
413 napi_get_named_property(env, recv, type, &callback); in NewCallWorkCallback()
414 if (NapiHelper::IsCallable(env, callback)) { in NewCallWorkCallback()
416 napi_call_function(env, recv, callback, argc, argv, &callbackResult); in NewCallWorkCallback()
[all …]
Dworker.cpp93 napi_value callback = nullptr; in CallWorkCallback() local
94 napi_get_named_property(env, recv, type, &callback); in CallWorkCallback()
95 if (NapiHelper::IsCallable(env, callback)) { in CallWorkCallback()
97 napi_call_function(env, recv, callback, argc, argv, &callbackResult); in CallWorkCallback()
271 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onerror"); in HostOnErrorInner() local
272 bool isCallable = NapiHelper::IsCallable(hostEnv_, callback); in HostOnErrorInner()
281 napi_call_function(hostEnv_, obj, callback, 1, argv, &callbackResult); in HostOnErrorInner()
400 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onmessage"); in HostOnMessageInner() local
401 bool isCallable = NapiHelper::IsCallable(hostEnv_, callback); in HostOnMessageInner()
440 napi_call_function(hostEnv_, obj, callback, 1, argv, &callbackResult); in HostOnMessageInner()
[all …]
Dworker.h44 WorkerListener(napi_env env, napi_ref callback, ListenerMode mode) in WorkerListener()
45 : env_(env), callback_(callback), mode_(mode) in WorkerListener()
326 void RemoveListenerInner(napi_env env, const char* type, napi_ref callback);
415 void ParentPortRemoveListenerInner(napi_env env, const char* type, napi_ref callback);
Dworker_new.h44 WorkerListener(napi_env env, napi_ref callback, ListenerMode mode) in WorkerListener()
45 : env_(env), callback_(callback), mode_(mode) in WorkerListener()
326 void RemoveListenerInner(napi_env env, const char* type, napi_ref callback);
415 void ParentPortRemoveListenerInner(napi_env env, const char* type, napi_ref callback);
/commonlibrary/ets_utils/js_concurrent_module/taskpool/
Dtask_runner.cpp22 TaskRunner::TaskRunner(TaskStartCallback callback) : callback_(callback), selfThreadId_(uv_thread_s… in TaskRunner() argument
40 if (callback_.callback != nullptr) { in Run()
41 callback_.callback(callback_.data); in Run()
Dtask_runner.h29 : callback(function), data(dataArgs) in callback() function
32 CallbackFunction callback; member
49 explicit TaskRunner(TaskStartCallback callback);
/commonlibrary/c_utils/base/include/
Dtimer.h107 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false);
120 …virtual uint32_t DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &…
122 void DoTimerListCallback(const TimerListCallback& callback, int timerFd);
131 TimerCallback callback; member
Dsafe_map.h55 void ChangeValueByLambda(const K& key, LambdaCallback callback) in ChangeValueByLambda() argument
58 callback(map_[key]); in ChangeValueByLambda()
203 void Iterate(const SafeMapCallBack& callback) in Iterate() argument
208 callback(it -> first, it -> second); in Iterate()
/commonlibrary/c_utils/base/src/
Dtimer.cpp76 uint32_t Timer::Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once) in Register() argument
98 entry->callback = callback; in Register()
150 uint32_t Timer::DoRegister(const TimerListCallback& callback, uint32_t interval, bool once, int &ti… in DoRegister() argument
153 std::function<void(int)> cb = std::bind(&Timer::DoTimerListCallback, this, callback, _1); in DoRegister()
189 ptr->callback(); in OnTimer()
203 void Timer::DoTimerListCallback(const TimerListCallback& callback, int timerFd) in DoTimerListCallback() argument
205 callback(timerFd); in DoTimerListCallback()
Dtimer_event_handler.h44 void SetTimerCallback(const TimerCallback& callback) { callback_ = callback; } in SetTimerCallback() argument
/commonlibrary/memory_utils/libpurgeablemem/cpp/include/
Dpurgeable_mem_builder.h41 void SetRebuildSuccessCallback(std::function<void()> &callback) in SetRebuildSuccessCallback() argument
43 rebuildSuccessCallback_ = callback; in SetRebuildSuccessCallback()
Dpurgeable_mem_base.h95 void SetRebuildSuccessCallback(std::function<void()> &callback);
/commonlibrary/ets_utils/js_sys_module/timer/
Dtimer.h39 TimerCallbackInfo(napi_env env, uint32_t tId, int32_t timeout, napi_ref callback, in TimerCallbackInfo()
41 : env_(env), tId_(tId), timeout_(timeout), callback_(callback), in TimerCallbackInfo()
Dtimer.cpp119 napi_value callback = Helper::NapiHelper::GetReferenceValue(env, callbackInfo->callback_); in TimerCallback() local
127 napi_call_function(env, undefinedValue, callback, in TimerCallback()
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ffi/
Dpem.rs34 callback: PemPasswordCb, in PEM_read_bio_X509()
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/
Doverlapped.rs24 pub(crate) callback: fn(&OVERLAPPED_ENTRY, Option<&mut Vec<Event>>), field
Dselector.rs170 let callback = (*(iocp_event.overlapped() as *mut super::Overlapped)).callback; in feed_events() localVariable
173 callback(iocp_event.entry(), Some(events)); in feed_events()
288 let callback = unsafe { in drop() localVariable
289 (*(iocp_event.overlapped() as *mut super::Overlapped)).callback in drop()
292 callback(iocp_event.entry(), None); in drop()
/commonlibrary/rust/ylong_runtime/ylong_ffrt/src/
Dsys_event.rs36 callback: FfrtFdCallBack, in ffrt_poller_register()
/commonlibrary/c_utils/base/test/unittest/common/
Dutils_event_test.cpp573 …e void SetTimerEventCallback(const TimerEventCallback& callback) { timerEventCallback_ = callback;… in SetTimerEventCallback() argument
605 uint32_t Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once = false);
610 void OnTimer(TimerEventHandler* handler, const TimerCallback& callback);
619 …ErrCode ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, uint32_t timerId, int…
685 ErrCode Timer::ScheduleTimer(const TimerEventCallback& callback, uint32_t interval, in ScheduleTimer() argument
691 handler->SetTimerEventCallback(callback); in ScheduleTimer()
709 uint32_t Timer::Register(const TimerCallback& callback, uint32_t interval /* ms */, bool once) in Register() argument
714 … TimerEventCallback wrappedCb = std::bind(&Timer::OnTimer, this, std::placeholders::_1, callback); in Register()
771 void Timer::OnTimer(TimerEventHandler* handler, const TimerCallback& callback) in OnTimer() argument
773 callback(); in OnTimer()
/commonlibrary/ets_utils/js_concurrent_module/common/helper/
Dnapi_helper.cpp143 napi_ref callback = nullptr; in CreateReference() local
144 napi_create_reference(env, value, refcount, &callback); in CreateReference()
145 return callback; in CreateReference()
/commonlibrary/memory_utils/libpurgeablemem/cpp/src/
Dpurgeable_mem_base.cpp301 void PurgeableMemBase::SetRebuildSuccessCallback(std::function<void()> &callback) in SetRebuildSuccessCallback() argument
304 builder_->SetRebuildSuccessCallback(callback); in SetRebuildSuccessCallback()
/commonlibrary/c_utils/docs/zh-cn/
Dc_utils_timer.md15 | uint32_t | **Register**(const TimerCallback& callback, uint32_t interval, bool once = false)<br>注…
Dc-utils-guide-safeMap.md25 | void | **Iterate**(const SafeMapCallBack& callback)<br>遍历map中的元素。 |

12