Minor changes
This commit is contained in:
parent
964a072e80
commit
99dfb8e2ce
@ -50,7 +50,7 @@ def main():
|
|||||||
executor = ProgramExecutor(program, loop=True)
|
executor = ProgramExecutor(program, loop=True)
|
||||||
|
|
||||||
def handle_stop_signal(signum, frame):
|
def handle_stop_signal(signum, frame):
|
||||||
logging.warning(f"Signal {signum} received. Stopping execution!")
|
logging.warning(f"Signal {signum} received. Aborting execution!")
|
||||||
executor.abort()
|
executor.abort()
|
||||||
|
|
||||||
# Should be possible to call only once
|
# Should be possible to call only once
|
||||||
|
@ -32,6 +32,7 @@ class ProgramExecutor(Thread):
|
|||||||
self._logger = logging.getLogger("program_executor")
|
self._logger = logging.getLogger("program_executor")
|
||||||
|
|
||||||
def abort(self):
|
def abort(self):
|
||||||
|
self._logger.debug("Aborting due to external request...")
|
||||||
self._state = ProgramExecutorStates.ABORTED
|
self._state = ProgramExecutorStates.ABORTED
|
||||||
self._program[self._pc].abort()
|
self._program[self._pc].abort()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user