diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-02-27 20:43:29 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-27 20:53:20 +0100 |
commit | a860cd108c7e3e1eb0e5dfef6020610da1c07ed3 (patch) | |
tree | 823104e869cbd06222adeab3cd660cff1d1e60ea /cppu/source/threadpool/jobqueue.hxx | |
parent | 3f43ebb4c3daf3e5c20a30a84f97bb4c93bff8a6 (diff) |
cppu: JobQueue::enter: add mutex guards for m_nToDo
Considered replacing it with oslInterlockedCount, but wondered why there is
no osl_getInterlockedCount (similar to glib's g_atomic_int_get)...
Diffstat (limited to 'cppu/source/threadpool/jobqueue.hxx')
-rw-r--r-- | cppu/source/threadpool/jobqueue.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cppu/source/threadpool/jobqueue.hxx b/cppu/source/threadpool/jobqueue.hxx index 6bddcc73483f..65f4a6075ea9 100644 --- a/cppu/source/threadpool/jobqueue.hxx +++ b/cppu/source/threadpool/jobqueue.hxx @@ -68,12 +68,12 @@ namespace cppu_threadpool void suspend(); void resume(); - sal_Bool isEmpty(); - sal_Bool isCallstackEmpty(); + sal_Bool isEmpty() const; + sal_Bool isCallstackEmpty() const; sal_Bool isBusy() const; private: - ::osl::Mutex m_mutex; + mutable ::osl::Mutex m_mutex; JobList m_lstJob; CallStackList m_lstCallstack; sal_Int32 m_nToDo; |