MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / DoWork

Method DoWork

test/async_worker.cc:118–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116class TestWorkerWithResult : public AsyncWorker {
117 public:
118 static void DoWork(const CallbackInfo& info) {
119 bool succeed = info[0].As<Boolean>();
120 Object resource = info[1].As<Object>();
121 Function cb = info[2].As<Function>();
122 Value data = info[3];
123
124 TestWorkerWithResult* worker =
125 new TestWorkerWithResult(cb, "TestResource", resource);
126 worker->Receiver().Set("data", data);
127 worker->_succeed = succeed;
128 worker->Queue();
129 }
130
131 protected:
132 void Execute() override {

Callers

nothing calls this directly

Calls 2

SetMethod · 0.80
QueueMethod · 0.80

Tested by

no test coverage detected