Minor changes

This commit is contained in:
Pünkösd Marcell 2021-04-11 14:15:04 +02:00
parent 964a072e80
commit 99dfb8e2ce
2 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def main():
executor = ProgramExecutor(program, loop=True)
def handle_stop_signal(signum, frame):
logging.warning(f"Signal {signum} received. Stopping execution!")
logging.warning(f"Signal {signum} received. Aborting execution!")
executor.abort()
# Should be possible to call only once

View File

@ -32,6 +32,7 @@ class ProgramExecutor(Thread):
self._logger = logging.getLogger("program_executor")
def abort(self):
self._logger.debug("Aborting due to external request...")
self._state = ProgramExecutorStates.ABORTED
self._program[self._pc].abort()