MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / DoWork

Method DoWork

test/async_progress_worker.cc:172–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170class TestWorker : public AsyncProgressWorker<ProgressData> {
171 public:
172 static void DoWork(const CallbackInfo& info) {
173 int32_t times = info[0].As<Number>().Int32Value();
174 Function cb = info[1].As<Function>();
175 Function progress = info[2].As<Function>();
176
177 TestWorker* worker =
178 new TestWorker(cb, progress, "TestResource", Object::New(info.Env()));
179 worker->_times = times;
180 worker->Queue();
181 }
182
183 protected:
184 void Execute(const ExecutionProgress& progress) override {

Callers

nothing calls this directly

Calls 2

EnvMethod · 0.80
QueueMethod · 0.80

Tested by

no test coverage detected