From 3809b8b3b5be159e3e492a0db0c99da29dbfd14b Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 24 Mar 2013 21:38:08 +0400 Subject: [PATCH] Allow multiple shutdowns with multiple starts --- powerline/lib/threaded.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/lib/threaded.py b/powerline/lib/threaded.py index 73aff250..0089e1c7 100644 --- a/powerline/lib/threaded.py +++ b/powerline/lib/threaded.py @@ -17,7 +17,6 @@ class ThreadedSegment(object): super(ThreadedSegment, self).__init__() self.shutdown_event = Event() self.write_lock = Lock() - self.keep_going = True self.run_once = True self.did_set_interval = False self.thread = None @@ -48,6 +47,7 @@ class ThreadedSegment(object): return self.thread and self.thread.is_alive() def start(self): + self.keep_going = True self.thread = Thread(target=self.run) self.thread.start()