From 6b76bbd5f2a80399a096766262e7c63bb7140dbf Mon Sep 17 00:00:00 2001 From: fawce Date: Mon, 19 Mar 2012 23:23:57 -0400 Subject: [PATCH] set get_id property for the simulator, per @sdiehl's request --- zipline/simulator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zipline/simulator.py b/zipline/simulator.py index b63d6d9b..99185c7c 100644 --- a/zipline/simulator.py +++ b/zipline/simulator.py @@ -33,6 +33,10 @@ class Simulator(ComponentHost): ComponentHost.__init__(self, addresses) self.subthreads = [] self.running = False + + @property + def get_id(self): + return 'Simple Simulator' def launch_controller(self): thread = threading.Thread(target=self.controller.run) @@ -49,6 +53,7 @@ class Simulator(ComponentHost): self.running = True return thread + def did_clean_shutdown(self): return not any([t.isAlive() for t in self.subthreads])