--- a/Beremiz_service.py Fri Oct 21 17:52:45 2022 +0200
+++ b/Beremiz_service.py Fri Oct 21 18:33:06 2022 +0200
@@ -587,7 +587,7 @@
# interleaved worker copes with wxreactor by delegating all asynchronous
- runtime.MainWorker.interleave(waker_func, FirstWorkerJob)
+ runtime.MainWorker.interleave(waker_func, reactor.stop, FirstWorkerJob) reactor.run(installSignalHandlers=False)
--- a/runtime/PLCObject.py Fri Oct 21 17:52:45 2022 +0200
+++ b/runtime/PLCObject.py Fri Oct 21 18:33:06 2022 +0200
@@ -623,7 +623,7 @@
--- a/runtime/Worker.py Fri Oct 21 17:52:45 2022 +0200
+++ b/runtime/Worker.py Fri Oct 21 18:33:06 2022 +0200
@@ -52,6 +52,8 @@
self.free = Condition(self.mutex)
@@ -87,13 +89,14 @@
- def interleave(self, waker, *args, **kwargs):
+ def interleave(self, waker, stopper, *args, **kwargs): as for twisted reactor's interleave, it passes all jobs to waker func
additionaly, it creates a new thread to wait for new job.
self.feed = Condition(self.mutex)
self._threadID = _thread.get_ident()
@@ -119,6 +122,8 @@
@@ -189,3 +194,9 @@
+ if self.own_thread is None: + if self.stopper is not None: