Minor changes
This commit is contained in:
parent
964a072e80
commit
99dfb8e2ce
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user