History

V8 event loop handling

Ada committed 7 months ago

Commit e266f611 parent 384cf355 files · +75 −0Browse files

Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 5 files). Show all

Unified · Split

libraries/script-engine/src/ScriptManager.cpp+3−0
@@ -550,6 +550,7 @@ void ScriptManager::waitTillDoneRunning(bool shutdown) { · 549 unmodified lines
550550 // if they access Settings or Menu in any of their shutdown code. So:
551551 // Process events for this thread, allowing invokeMethod calls to pass between threads.
552552 QCoreApplication::processEvents();
553+ _engine->processEvents();
553554 }
554555
555556 // Avoid a pure busy wait
@@ -1068,6 +1069,7 @@ void ScriptManager::run() { · 512 unmodified lines
10681069 } else {
10691070 QCoreApplication::processEvents();
10701071 }
1072+ _engine->processEvents();
10711073 processedEvents = true;
10721074 _engine->perManagerLoopIterationCleanup();
10731075 }
@@ -1103,6 +1105,7 @@ void ScriptManager::run() { · 29 unmodified lines
11031105 if (!processedEvents) {
11041106 PROFILE_RANGE(script, "processEvents");
11051107 QCoreApplication::processEvents();
1108+ _engine->processEvents();
11061109 }
11071110
11081111 if (_isFinished) {