be precise for threads: zero threads disable threading

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3188 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2006-05-15 18:35:16 +00:00
parent b3b45d7f06
commit ac682df355

View file

@ -53,8 +53,10 @@ class Aggregate (object):
def start_threads (self):
if self.config["status"]:
start_thread(self.status)
for i in range(self.config["threads"]):
start_thread(self.worker)
num = self.config["threads"]
if num >= 1:
for i in range(num):
start_thread(self.worker)
else:
self.worker()