Answer the question
In order to leave comments, you need to log in
How to make asynchronous callback in node.js addon?
I did not find a solution on the Internet. It is necessary to make an asynchronous callback, the function must be executed in a separate thread, and upon completion, call the callback.
Such code works only in one thread, and when you try to call it from another thread, the application crashes.
Local<Function> callback = Local<Function>::Cast(args[1]);
callback->Call(isolate->GetCurrentContext()->Global(), 1, argv);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question