--- a/Beremiz_service.py Wed Feb 13 13:08:26 2019 +0100
+++ b/Beremiz_service.py Thu Feb 14 10:06:43 2019 +0100
@@ -435,6 +435,7 @@
# UI threads can be either the one from WX main loop or
# worker thread from twisted "threadselect" reactor
current_id = currentThread().ident
+
if ui_thread is not None \
and ui_thread.ident != current_id \
and (not havetwisted or (
@@ -570,6 +571,7 @@
# This order ui loop to unblock main thread when ready.
if havetwisted:
def signal_uithread_started():
+ global twisted_reactor_thread_id
twisted_reactor_thread_id = currentThread().ident
ui_thread_started.release()
reactor.callLater(0, signal_uithread_started)