]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/daemon.py
daemon: Don't wait until the worker thread has finished after sending shutdown signal
[collecty.git] / src / collecty / daemon.py
index 167d000ee46e5399ea5111d63d21c9f27cb35617..0891f8a9f30a8405b6fb353ef3207f7a1cffc963 100644 (file)
@@ -193,9 +193,9 @@ class Collecty(object):
                        Creates a number of worker threads
                """
                # If no number of threads is given, we will create as many as we have
-               # active processor cores but never less than four.
+               # active processor cores but never less than two.
                if num is None:
-                       num = max(multiprocessing.cpu_count(), 4)
+                       num = max(multiprocessing.cpu_count(), 2)
 
                worker_threads = []
 
@@ -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):