History

Merge pull request #7853 from zzmp/fix/shutdown

Fix hang on exit from dying scripts

Brad Hefta-Gaub committed 10 years ago

Commit 166fbde2 parents cf59fa8 4e62d7f7 files · +33 −38Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+6−0
@@ -1156,10 +1156,16 @@ void Application::cleanupBeforeQuit() { · 1155 unmodified lines
11561156
11571157 getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
11581158
1159+ // Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
1160+ QThreadPool::globalInstance()->clear();
1161+
11591162 DependencyManager::get<ScriptEngines>()->saveScripts();
11601163 DependencyManager::get<ScriptEngines>()->shutdownScripting(); // stop all currently running global scripts
11611164 DependencyManager::destroy<ScriptEngines>();
11621165
1166+ // Cleanup all overlays after the scripts, as scripts might add more
1167+ _overlays.cleanupAllOverlays();
1168+
11631169 // first stop all timers directly or by invokeMethod
11641170 // depending on what thread they run in
11651171 locationUpdateTimer.stop();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t