summaryrefslogtreecommitdiffstats
path: root/binaryurp/source/bridge.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-05-16 22:09:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-05-16 22:09:21 +0200
commitd015384e1d98fe77fd59339044f58efb1ab9fb25 (patch)
tree27972d297a53f302b148f542d11983b54328496c /binaryurp/source/bridge.hxx
parentimprove make invocation (diff)
downloadcore-d015384e1d98fe77fd59339044f58efb1ab9fb25.tar.gz
core-d015384e1d98fe77fd59339044f58efb1ab9fb25.zip
Fixed ThreadPool (and dependent ORequestThread) life cycle
At least with sw_complex test under load, it happened that an ORequestThread could still process a remote release request while the main thread was already in exit(3). This was because (a) ThreadPool never joined with the spawned worker threads (which has been rectified by calling uno_threadpool_dispose(0) from the final uno_threadpool_destroy), and (b) binaryurp::Bridge called uno_threadpool_destroy only from its destructor (which could go as late as exit(3)) instead of from terminate. Additional clean up: * Access to Bridge's threadPool_ is now cleanly controlled by mutex_ (even though that might not be necessary in every case). * ThreadPool's stopDisposing got renamed to destroy, to make meaning clearer. Change-Id: I45fa76e80e790a11065e7bf8ac9d92af2e62f262
Diffstat (limited to 'binaryurp/source/bridge.hxx')
-rw-r--r--binaryurp/source/bridge.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index cf281f2febfd..8d667897d253 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -106,7 +106,7 @@ public:
BinaryAny mapCppToBinaryAny(com::sun::star::uno::Any const & cppAny);
- uno_ThreadPool getThreadPool() const;
+ uno_ThreadPool getThreadPool();
rtl::Reference< Writer > getWriter();
@@ -258,11 +258,11 @@ private:
com::sun::star::uno::TypeDescription protPropType_;
com::sun::star::uno::TypeDescription protPropRequest_;
com::sun::star::uno::TypeDescription protPropCommit_;
- uno_ThreadPool threadPool_;
OutgoingRequests outgoingRequests_;
osl::Mutex mutex_;
Listeners listeners_;
+ uno_ThreadPool threadPool_;
rtl::Reference< Writer > writer_;
rtl::Reference< Reader > reader_;
bool currentContextMode_;