# HG changeset patch # User Edouard Tisserant # Date 1544011551 -3600 # Node ID fce6ab7ae156cdf39f19ee75d01afbc89d8b6d25 # Parent 98d28d809488aa559c99a39fb12915afd84d3e23 Enure that autostart blocks other @RunInMain PLCObject methods, and _unblocks_ them once autostart is done... diff -r 98d28d809488 -r fce6ab7ae156 runtime/Worker.py --- a/runtime/Worker.py Wed Dec 05 13:04:37 2018 +0100 +++ b/runtime/Worker.py Wed Dec 05 13:05:51 2018 +0100 @@ -56,6 +56,7 @@ meant to be called by worker thread (blocking) """ self._threadID = thread.get_ident() + self.mutex.acquire() if args or kwargs: _job = job(*args, **kwargs) _job.do() @@ -64,7 +65,6 @@ pass else: raise _job.exc_info[0], _job.exc_info[1], _job.exc_info[2] - self.mutex.acquire() while not self._finish: self.todo.wait() if self.job is not None: