summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-02-15 11:31:04 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-02-19 10:24:20 +0100
commit459daaf4b3cfee96846deb69b1d269d1adf96ea3 (patch)
treebd6ce51b3a36f10985ff175773262e4dca8ba97b
parentupdate credits (diff)
downloadcore-459daaf4b3cfee96846deb69b1d269d1adf96ea3.tar.gz
core-459daaf4b3cfee96846deb69b1d269d1adf96ea3.zip
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)
-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 908a53e8bc0c..60444284d097 100644
--- a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
+++ b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
@@ -91,7 +91,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();
}
/**