diff -r 2ec02f0f9fa9 -r 49a6738b7c63 Beremiz_service.py --- a/Beremiz_service.py Fri Jun 15 16:41:55 2018 +0300 +++ b/Beremiz_service.py Mon Jun 18 12:12:57 2018 +0300 @@ -499,7 +499,7 @@ if havewx: wx_eval_lock = Semaphore(0) - main_thread = currentThread() + # main_thread = currentThread() def statuschangeTskBar(status): wx.CallAfter(taskbar_instance.UpdateIcon, status) @@ -512,14 +512,14 @@ wx_eval_lock.release() def evaluator(tocall, *args, **kwargs): - if main_thread == currentThread(): - # avoid dead lock if called from the wx mainloop - return default_evaluator(tocall, *args, **kwargs) - else: - o = type('', (object,), dict(call=(tocall, args, kwargs), res=None)) - wx.CallAfter(wx_evaluator, o) - wx_eval_lock.acquire() - return o.res + # if main_thread == currentThread(): + # # avoid dead lock if called from the wx mainloop + # return default_evaluator(tocall, *args, **kwargs) + # else: + o = type('', (object,), dict(call=(tocall, args, kwargs), res=None)) + wx.CallAfter(wx_evaluator, o) + wx_eval_lock.acquire() + return o.res pyroserver = Server(servicename, given_ip, port, WorkingDir, argv,