summaryrefslogtreecommitdiff
path: root/cppu/source/threadpool/threadpool.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppu/source/threadpool/threadpool.hxx')
-rw-r--r--cppu/source/threadpool/threadpool.hxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx
index cb580eaf92a2..e1c9a127fa55 100644
--- a/cppu/source/threadpool/threadpool.hxx
+++ b/cppu/source/threadpool/threadpool.hxx
@@ -30,6 +30,8 @@
#include <rtl/byteseq.hxx>
+#include <boost/shared_ptr.hpp>
+
#include "jobqueue.hxx"
@@ -76,12 +78,15 @@ namespace cppu_threadpool {
typedef ::std::list < struct ::cppu_threadpool::WaitingThread * > WaitingThreadList;
+ class DisposedCallerAdmin;
+ typedef boost::shared_ptr<DisposedCallerAdmin> DisposedCallerAdminHolder;
+
class DisposedCallerAdmin
{
public:
~DisposedCallerAdmin();
- static DisposedCallerAdmin *getInstance();
+ static DisposedCallerAdminHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@@ -92,11 +97,15 @@ namespace cppu_threadpool {
DisposedCallerList m_lst;
};
+ class ThreadPool;
+ typedef boost::shared_ptr<ThreadPool> ThreadPoolHolder;
+
class ThreadPool
{
public:
+ ThreadPool();
~ThreadPool();
- static ThreadPool *getInstance();
+ static ThreadPoolHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@@ -124,6 +133,8 @@ namespace cppu_threadpool {
::osl::Mutex m_mutexWaitingThreadList;
WaitingThreadList m_lstThreads;
+
+ DisposedCallerAdminHolder m_DisposedCallerAdmin;
};
} // end namespace cppu_threadpool