MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / dispatch_tasker_sink

Method dispatch_tasker_sink

source/binding/NodeJS/src/plugin/runtime.cpp:250–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void QuickJSRuntime::dispatch_tasker_sink(MaaTasker* handle, const char* message, const char* details_json)
251{
252 std::promise<void> promise;
253 std::future<void> future = promise.get_future();
254 d_->push_task([&promise, handle, message, details_json, &sinks = d_->plugin_tasker_sinks](JSContext*) {
255 for (const auto& sink : sinks) {
256 sink(handle, message, details_json);
257 }
258 promise.set_value();
259 });
260 return future.get();
261}
262
263void QuickJSRuntime::dispatch_context_sink(MaaContext* handle, const char* message, const char* details_json)
264{

Callers 1

OnTaskerEventFunction · 0.80

Calls 2

push_taskMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected