summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-08-04 23:36:13 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-05 19:03:58 +0000
commit98d33dbe6cdf9bd980b3ef4758610c6a70b7cb9a (patch)
treef4e775a4ef0a10ac3bb3045729e34021f1d56f48
parent8767a9d98ff6d8f8cb628e7b7a1ef0ddd0a23142 (diff)
tdf#76845: wizards: fix Web wizard XSLT deadlock on Windows
The web wizard runs some XSLT over the exported file. It registers a handler that is called when the output stream is closed, and this Process.streamClosedHandler() calls terminate(), which causes the deadlock, because it wants to join() the extra XSLT thread but the handler is actually called from the XSLT thread itself. Fix that by moving the terminate() to another function that runs in the main thread. It does not deadlock on Unixes because osl_joinWithThread() actually detects an attempt to join the calling thread and returns early. Change-Id: Ia176562fa28b97c7e8956c1e8975c9aa6ee23236 (cherry picked from commit 62de18ab98289fc80984299f13ad71e4a4452ea3) Reviewed-on: https://gerrit.libreoffice.org/17514 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--wizards/com/sun/star/wizards/web/Process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wizards/com/sun/star/wizards/web/Process.py b/wizards/com/sun/star/wizards/web/Process.py
index 530b979b5e9c..82be8b711c19 100644
--- a/wizards/com/sun/star/wizards/web/Process.py
+++ b/wizards/com/sun/star/wizards/web/Process.py
@@ -375,6 +375,7 @@ class Process(ProcessErrors):
self.tf.start()
while (not self.tfCompleted):
pass
+ self.tf.terminate()
task.advance(True)
@@ -400,7 +401,6 @@ class Process(ProcessErrors):
print ("DEBUG !!! Stream 'error' event handler")
def streamClosedHandler(self, parent):
- parent.tf.terminate()
parent.tfCompleted = True
# I broke the export method to two methods