summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-02-15 11:31:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-03-04 10:43:53 +0100
commit188fe404ba3157f739ee3e3dd65b42f8013ce39e (patch)
tree7c19d6e72cabd7a14ec9d8cd35fe9cd0704d6b48
parent01d140e2205306159da57b9ec703e1a54802115c (diff)
tdf#123481 jurt: Avoid thread deadlocking
Change-Id: I7b6454090aeb1046a814520166a5b8c39b716f6d Reviewed-on: https://gerrit.libreoffice.org/67861 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit ea3c25358e3136cf900bc4e7d1bd6387dcca7883) Reviewed-on: https://gerrit.libreoffice.org/68660 Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--jurt/com/sun/star/lib/util/AsynchronousFinalizer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
index 0e7ecc41ba4d..588b8fe388f6 100644
--- a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
+++ b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
@@ -92,7 +92,9 @@ public final class AsynchronousFinalizer {
done = true;
queue.notify();
}
- thread.join();
+ // tdf#123481 Only join if we are not in our own thread, else we have a deadlock
+ if (Thread.currentThread() != thread)
+ thread.join();
}
/**