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

Method DoWork

test/async_worker.cc:60–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 public:
59 CustomAllocWorker(Function& cb) : AsyncWorker(cb){};
60 static void DoWork(const CallbackInfo& info) {
61 Function cb = info[0].As<Function>();
62 Allocator allocator;
63 CustomAllocWorker* newWorker = allocator.allocate(1);
64 std::allocator_traits<Allocator>::construct(allocator, newWorker, cb);
65 newWorker->Queue();
66 }
67
68 protected:
69 void Execute() override {}

Callers

nothing calls this directly

Calls 1

QueueMethod · 0.80

Tested by

no test coverage detected