summaryrefslogtreecommitdiff
path: root/include/comphelper/threadpool.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/comphelper/threadpool.hxx')
-rw-r--r--include/comphelper/threadpool.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/comphelper/threadpool.hxx b/include/comphelper/threadpool.hxx
index cfa471b60802..2f726f0b406f 100644
--- a/include/comphelper/threadpool.hxx
+++ b/include/comphelper/threadpool.hxx
@@ -36,6 +36,12 @@ public:
/// count for the CPU
static ThreadPool& getSharedOptimalPool();
+ /// returns a configurable max-concurrency
+ /// limit to avoid spawning an unnecessarily
+ /// large number of threads on high-core boxes.
+ /// MAX_CONCURRENCY envar controls the cap.
+ static sal_Int32 getPreferredConcurrency();
+
ThreadPool( sal_Int32 nWorkers );
virtual ~ThreadPool();