diff options
Diffstat (limited to 'cppu/source/threadpool/jobqueue.cxx')
-rw-r--r-- | cppu/source/threadpool/jobqueue.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cppu/source/threadpool/jobqueue.cxx b/cppu/source/threadpool/jobqueue.cxx index 2604af98dee4..333a350c0b23 100644 --- a/cppu/source/threadpool/jobqueue.cxx +++ b/cppu/source/threadpool/jobqueue.cxx @@ -42,6 +42,7 @@ namespace cppu_threadpool { m_cndWait( osl_createCondition() ) { osl_resetCondition( m_cndWait ); + m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance(); } JobQueue::~JobQueue() @@ -68,7 +69,7 @@ namespace cppu_threadpool { { // synchronize with the dispose calls MutexGuard guard( m_mutex ); - if( DisposedCallerAdmin::getInstance()->isDisposed( nDisposeId ) ) + if( m_DisposedCallerAdmin->isDisposed( nDisposeId ) ) { return 0; } @@ -97,6 +98,10 @@ namespace cppu_threadpool { if( 0 == m_lstCallstack.front() ) { // disposed ! + if( m_lstJob.empty() ) + { + osl_resetCondition( m_cndWait ); + } break; } |