beremiz

Enure that all threads are joined before trying to exit
fix_PLC_runtime_shutdown
2019-04-18, Edouard Tisserant
9c5b20dc2b2e
Parents 0e20a0d48fae
Children 19dc6b830e7d
Enure that all threads are joined before trying to exit
--- a/Beremiz_service.py Wed Apr 17 14:18:22 2019 +0200
+++ b/Beremiz_service.py Thu Apr 18 14:29:55 2019 +0200
@@ -582,6 +582,7 @@
pass
pyroserver.Quit()
+pyro_thread.join()
plcobj = runtime.GetPLCObjectSingleton()
plcobj.StopPLC()
@@ -589,7 +590,9 @@
if havetwisted:
reactor.stop()
+ ui_thread.join()
elif havewx:
app.ExitMainLoop()
+ ui_thread.join()
sys.exit(0)