summaryrefslogtreecommitdiff
path: root/cppu/source/threadpool/threadpool.hxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:49:44 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:49:44 +0000
commit941d1a150dc9a1542baafb7d1ee614a0209fcb1a (patch)
treecdc9148bac89bcfd20914839bcfb7847de7c01ac /cppu/source/threadpool/threadpool.hxx
parent55fda0f7dae453141201860c9784bf2423741d57 (diff)
INTEGRATION: CWS sb49 (1.2.38); FILE MERGED
2006/03/22 10:14:07 sb 1.2.38.1: #i63397# Keep objects alive long enough so that threads still running while atexit handlers are processed do not access dead objects.
Diffstat (limited to 'cppu/source/threadpool/threadpool.hxx')
-rw-r--r--cppu/source/threadpool/threadpool.hxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx
index 63c2704cc5e9..95cc56e2e7a3 100644
--- a/cppu/source/threadpool/threadpool.hxx
+++ b/cppu/source/threadpool/threadpool.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: threadpool.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 08:48:33 $
+ * last change: $Author: hr $ $Date: 2006-04-19 13:49:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,6 +38,9 @@
#include <rtl/byteseq.hxx>
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
+
#include "jobqueue.hxx"
@@ -89,8 +92,6 @@ namespace cppu_threadpool {
public:
~DisposedCallerAdmin();
- static DisposedCallerAdmin *getInstance();
-
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
sal_Bool isDisposed( sal_Int64 nDisposeId );
@@ -100,11 +101,10 @@ namespace cppu_threadpool {
DisposedCallerList m_lst;
};
- class ThreadPool
+ class ThreadPool: public salhelper::SimpleReferenceObject
{
public:
- ~ThreadPool();
- static ThreadPool *getInstance();
+ ThreadPool();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@@ -123,7 +123,11 @@ namespace cppu_threadpool {
sal_Bool revokeQueue( const ByteSequence & aThreadId , sal_Bool bAsynchron );
void waitInPool( ORequestThread *pThread );
+
+ DisposedCallerAdmin m_disposedCallerAdmin;
+
private:
+ ~ThreadPool();
void createThread( JobQueue *pQueue, const ByteSequence &aThreadId, sal_Bool bAsynchron);