mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 14:46:55 +02:00
Merge pull request #13311 from ElderOrb/FB14390
terminate thread if it didn't complete during MAX_SCRIPT_QUITTING_TIME
This commit is contained in:
commit
66b66d5248
1 changed files with 1 additions and 1 deletions
|
@ -419,7 +419,7 @@ void ScriptEngine::waitTillDoneRunning() {
|
|||
// Wait for the scripting thread to stop running, as
|
||||
// flooding it with aborts/exceptions will persist it longer
|
||||
static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MSECS_PER_SECOND;
|
||||
if (workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) {
|
||||
if (!workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) {
|
||||
workerThread->terminate();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue