diff options
Diffstat (limited to 'comphelper/source/misc/threadpool.cxx')
-rw-r--r-- | comphelper/source/misc/threadpool.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index 95b6f2dff091..9b1991b7f3a1 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -105,6 +105,8 @@ ThreadPool::~ThreadPool() assert(maTasks.empty()); } +namespace { + struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPool >, ThreadPoolStatic > { @@ -114,6 +116,8 @@ struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPoo }; }; +} + ThreadPool& ThreadPool::getSharedOptimalPool() { return *ThreadPoolStatic::get(); |