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