summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/threadpool/threadpool.cxx8
-rw-r--r--cppu/source/threadpool/threadpool.hxx3
2 files changed, 8 insertions, 3 deletions
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index a9608fef3e1b..c5783dc19989 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -234,12 +234,16 @@ namespace cppu_threadpool
const ByteSequence &aThreadId ,
bool bAsynchron,
void *pThreadSpecificData,
- RequestFun * doRequest )
+ RequestFun * doRequest,
+ void const * disposeId )
{
bool bCreateThread = false;
JobQueue *pQueue = nullptr;
{
MutexGuard guard( m_mutex );
+ if (m_DisposedCallerAdmin->isDisposed(disposeId)) {
+ return true;
+ }
ThreadIdHashMap::iterator ii = m_mapQueue.find( aThreadId );
@@ -434,7 +438,7 @@ uno_threadpool_putJob(
void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ),
sal_Bool bIsOneway ) SAL_THROW_EXTERN_C()
{
- if (!getThreadPool(hPool)->addJob( pThreadId, bIsOneway, pJob ,doRequest ))
+ if (!getThreadPool(hPool)->addJob( pThreadId, bIsOneway, pJob ,doRequest, hPool ))
{
SAL_WARN(
"cppu.threadpool",
diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx
index c86e6575bb66..f473e2519348 100644
--- a/cppu/source/threadpool/threadpool.hxx
+++ b/cppu/source/threadpool/threadpool.hxx
@@ -126,7 +126,8 @@ namespace cppu_threadpool {
bool addJob( const ::rtl::ByteSequence &aThreadId,
bool bAsynchron,
void *pThreadSpecificData,
- RequestFun * doRequest );
+ RequestFun * doRequest,
+ void const * disposeId );
void prepare( const ::rtl::ByteSequence &aThreadId );
void * enter( const ::rtl::ByteSequence &aThreadId, void const * nDisposeId );