diff options
Diffstat (limited to 'cppu/source/threadpool/threadpool.hxx')
-rw-r--r-- | cppu/source/threadpool/threadpool.hxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx index 1ff1748fe..b9df49f43 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" @@ -75,13 +77,16 @@ 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 |