forked from p15670423/monkey
Agent: Add a few TODOs into AutomatedMaster
This commit is contained in:
parent
23886e2cf7
commit
fc88fb948c
|
@ -57,6 +57,9 @@ class AutomatedMaster(IMaster):
|
||||||
logger.warning("Timed out waiting for the simulation to stop")
|
logger.warning("Timed out waiting for the simulation to stop")
|
||||||
# Since the master thread and all child threads are daemon threads, they will be
|
# Since the master thread and all child threads are daemon threads, they will be
|
||||||
# forcefully killed when the program exits.
|
# 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")
|
logger.warning("Forcefully killing the simulation")
|
||||||
|
|
||||||
def _wait_for_master_stop_condition(self):
|
def _wait_for_master_stop_condition(self):
|
||||||
|
@ -65,6 +68,8 @@ class AutomatedMaster(IMaster):
|
||||||
|
|
||||||
while self._master_thread_should_run():
|
while self._master_thread_should_run():
|
||||||
if timer.is_expired():
|
if timer.is_expired():
|
||||||
|
# TODO: Handle exceptions in _check_for_stop() once
|
||||||
|
# ControlChannel.should_agent_stop() is refactored.
|
||||||
self._check_for_stop()
|
self._check_for_stop()
|
||||||
timer.reset()
|
timer.reset()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue