History

Add cap on entities scripting thread stop time

Zach Pomerantz committed 10 years ago

Commit 7e824941 parent f2f89ca3 files · +8 −1Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+0−1
@@ -304,7 +304,6 @@ void ScriptEngine::wait() { · 303 unmodified lines
304 QCoreApplication::processEvents();304 QCoreApplication::processEvents();
305 305
306 // If the final evaluation takes too long, then tell the script engine to stop evaluating306 // If the final evaluation takes too long, then tell the script engine to stop evaluating
307 static const auto MAX_SCRIPT_EVALUATION_TIME = USECS_PER_SECOND;
308 static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MAX_SCRIPT_EVALUATION_TIME;307 static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MAX_SCRIPT_EVALUATION_TIME;
309 auto elapsedUsecs = usecTimestampNow() - startedWaiting;308 auto elapsedUsecs = usecTimestampNow() - startedWaiting;
310 if (elapsedUsecs > MAX_SCRIPT_EVALUATION_TIME) {309 if (elapsedUsecs > MAX_SCRIPT_EVALUATION_TIME) {