daemon: Don't wait until the worker thread has finished after sending shutdown signal
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Jun 2015 11:47:18 +0000 (11:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Jun 2015 11:47:18 +0000 (11:47 +0000)
There is no need to wait for each worker thread individually.
Instead we send all worker threads the shutdown signal and
wait after that until they all have finished.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/daemon.py

index f5426fe..0891f8a 100644 (file)
@@ -270,9 +270,6 @@ class WorkerThread(threading.Thread):
        def shutdown(self):
                self.running = False
 
-               # Wait until all data has been written.
-               self.join()
-
 
 class WriteQueue(threading.Thread):
        def __init__(self, collecty, submit_interval):