summaryrefslogtreecommitdiffstats
path: root/src/core/jobs/qthreadpooler_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-07-31 11:25:23 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-07-31 09:30:36 +0000
commitcbeade7bde94a795eed14cdeadcb79184fa87858 (patch)
tree1d0e5c9b30e50562b7469bd3893553cd55ff19bc /src/core/jobs/qthreadpooler_p.h
parent162543b1d55d680cbe630a7ed25d9bc6c72a5437 (diff)
Expose the max thread count from the pooler
Assuming that the pooler allows up to idealThreadCount() threads is only true when the default settings of QThreadPool are in use. Once the limit gets reduced via setMaxThreadCount(), we get a deadlock. So expose the max number of threads (like with ThreadWeaver) from QThreadPooler and use that value instaed. Change-Id: I1ec0789da5f52a5b333b24f4b3b37dd487c69841 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/jobs/qthreadpooler_p.h')
-rw-r--r--src/core/jobs/qthreadpooler_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h
index 4a0a189a6..7020a14da 100644
--- a/src/core/jobs/qthreadpooler_p.h
+++ b/src/core/jobs/qthreadpooler_p.h
@@ -63,6 +63,8 @@ public:
void setDependencyHandler(DependencyHandler *handler);
+ int maxThreadCount() const;
+
private:
void enqueueTasks(QVector<RunnableInterface *> &tasks);
void acquire(int add);