mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-04-05 08:00:30 -04:00
Run microtasks after calling JS
This commit is contained in:
@@ -85,6 +85,9 @@ void Main(Local<Object> exports) {
|
||||
/* I guess we store this statically */
|
||||
isolate = exports->GetIsolate();
|
||||
|
||||
/* We want this */
|
||||
isolate->SetMicrotasksPolicy(MicrotasksPolicy::kAuto);
|
||||
|
||||
/* Register our own nextTick handlers */
|
||||
uWS::Loop::defaultLoop()->setPostHandler([](uWS::Loop *) {
|
||||
processNextTickQueueImpl(isolate);
|
||||
|
||||
Reference in New Issue
Block a user