diff --git a/src/addon.cpp b/src/addon.cpp index 9017bc1..8755096 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -54,6 +54,10 @@ void print(const FunctionCallbackInfo &args) { * Should return int queueSize after calling queued items, so that * proper while(processNextTickQueueImpl()) can be done */ int processNextTickQueueImpl(Isolate *isolate) { + + /* Run async continuations, promises and other V8-queued tasks */ + isolate->RunMicrotasks(); + if (nextTickQueue.size()) { /* Swap queues for recursive calls */ std::vector> currentNextTickQueue = std::move(nextTickQueue);