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
1156 1156
1157 getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts1157 getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
1158 1158
1159 // Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
1160 QThreadPool::globalInstance()->clear();
1161
1159 DependencyManager::get<ScriptEngines>()->saveScripts();1162 DependencyManager::get<ScriptEngines>()->saveScripts();
1160 DependencyManager::get<ScriptEngines>()->shutdownScripting(); // stop all currently running global scripts1163 DependencyManager::get<ScriptEngines>()->shutdownScripting(); // stop all currently running global scripts
1161 DependencyManager::destroy<ScriptEngines>();1164 DependencyManager::destroy<ScriptEngines>();
1162 1165
1166 // Cleanup all overlays after the scripts, as scripts might add more
1167 _overlays.cleanupAllOverlays();
1168
1163 // first stop all timers directly or by invokeMethod1169 // first stop all timers directly or by invokeMethod
1164 // depending on what thread they run in1170 // depending on what thread they run in
1165 locationUpdateTimer.stop();1171 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