equal
deleted
inserted
replaced
386 self.PythonRuntimeCall("init", use_evaluator=False) |
386 self.PythonRuntimeCall("init", use_evaluator=False) |
387 |
387 |
388 self.PythonThreadCondLock = Lock() |
388 self.PythonThreadCondLock = Lock() |
389 self.PythonThreadCond = Condition(self.PythonThreadCondLock) |
389 self.PythonThreadCond = Condition(self.PythonThreadCondLock) |
390 self.PythonThreadCmd = "Wait" |
390 self.PythonThreadCmd = "Wait" |
391 self.PythonThread = Thread(target=self.PythonThreadProc) |
391 self.PythonThread = Thread(target=self.PythonThreadProc, name="PLCPythonThread") |
392 self.PythonThread.start() |
392 self.PythonThread.start() |
393 |
393 |
394 # used internaly |
394 # used internaly |
395 def PythonRuntimeCleanup(self): |
395 def PythonRuntimeCleanup(self): |
396 if self.python_runtime_vars is not None: |
396 if self.python_runtime_vars is not None: |
643 return None |
643 return None |
644 |
644 |
645 def _TracesSwap(self): |
645 def _TracesSwap(self): |
646 self.LastSwapTrace = time() |
646 self.LastSwapTrace = time() |
647 if self.TraceThread is None and self.PLCStatus == PlcStatus.Started: |
647 if self.TraceThread is None and self.PLCStatus == PlcStatus.Started: |
648 self.TraceThread = Thread(target=self.TraceThreadProc) |
648 self.TraceThread = Thread(target=self.TraceThreadProc, name="PLCTrace") |
649 self.TraceThread.start() |
649 self.TraceThread.start() |
650 self.TraceLock.acquire() |
650 self.TraceLock.acquire() |
651 Traces = self.Traces |
651 Traces = self.Traces |
652 self.Traces = [] |
652 self.Traces = [] |
653 self.TraceLock.release() |
653 self.TraceLock.release() |