From a860cd108c7e3e1eb0e5dfef6020610da1c07ed3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 27 Feb 2012 20:43:29 +0100 Subject: 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)... --- cppu/source/threadpool/jobqueue.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cppu/source/threadpool/jobqueue.hxx') 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; -- cgit