From 93bc45a19eeea7acd48c332903cf5184bb096681 Mon Sep 17 00:00:00 2001 From: Alexandre Gauthier Date: Mon, 22 Dec 2014 08:52:55 +0100 Subject: [PATCH] QThreadPool: make sure threads do not exit after 30 sec otherwise they might crash with thread local storage. --- Engine/AppManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine/AppManager.cpp b/Engine/AppManager.cpp index 76920aac2a..810aac6167 100644 --- a/Engine/AppManager.cpp +++ b/Engine/AppManager.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "Global/MemoryInfo.h" @@ -386,6 +387,8 @@ AppManager::load(int &argc, initializeQApp(argc, argv); _imp->idealThreadCount = QThread::idealThreadCount(); + QThreadPool::globalInstance()->setExpiryTimeout(-1); //< make threads never exit on their own + //otherwise it might crash with thread local storage _imp->diskCachesLocation = Natron::StandardPaths::writableLocation(Natron::StandardPaths::CacheLocation) ; #if QT_VERSION < 0x050000