From 5e72a97a41dd8afd939abfd151793f36ae281a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 15 Apr 2021 10:47:49 +0800 Subject: [PATCH] thread pool won't release thread --- doric-Qt/doric/engine/DoricJSEngine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/doric-Qt/doric/engine/DoricJSEngine.cpp b/doric-Qt/doric/engine/DoricJSEngine.cpp index 9b0db8ce..a81e914c 100644 --- a/doric-Qt/doric/engine/DoricJSEngine.cpp +++ b/doric-Qt/doric/engine/DoricJSEngine.cpp @@ -17,6 +17,7 @@ DoricJSEngine::DoricJSEngine(QObject *parent) : QObject(parent) { mJSThreadPool.setMaxThreadCount(1); + mJSThreadPool.setExpiryTimeout(-1); { auto result = QtConcurrent::run(