Agent: Add a few TODOs into AutomatedMaster

This commit is contained in:
Mike Salvatore 2021-12-03 07:18:48 -05:00
parent 23886e2cf7
commit fc88fb948c
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,9 @@ class AutomatedMaster(IMaster):
logger.warning("Timed out waiting for the simulation to stop")
# Since the master thread and all child threads are daemon threads, they will be
# forcefully killed when the program exits.
# TODO: Daemon threads to not die when the parent THREAD does, but when the parent
# PROCESS does. This could lead to conflicts between threads that refuse to die
# and the cleanup() function. Come up with a solution.
logger.warning("Forcefully killing the simulation")
def _wait_for_master_stop_condition(self):
@ -65,6 +68,8 @@ class AutomatedMaster(IMaster):
while self._master_thread_should_run():
if timer.is_expired():
# TODO: Handle exceptions in _check_for_stop() once
# ControlChannel.should_agent_stop() is refactored.
self._check_for_stop()
timer.reset()