History

terminate thread if it didn't complete during MAX_SCRIPT_QUITTING_TIME

Alexander Ivash committed 8 years ago

Commit 5897c991 parent 08fcad11 file · +1 −1Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+1−1
@@ -419,7 +419,7 @@ void ScriptEngine::waitTillDoneRunning() { · 418 unmodified lines
419 // Wait for the scripting thread to stop running, as419 // Wait for the scripting thread to stop running, as
420 // flooding it with aborts/exceptions will persist it longer420 // flooding it with aborts/exceptions will persist it longer
421 static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MSECS_PER_SECOND;421 static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MSECS_PER_SECOND;
422 if (workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) {422 if (!workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) {
423 workerThread->terminate();423 workerThread->terminate();
424 }424 }
425 }425 }