Fix bug when stoping the thread pool, introduced by the prev rev.

This commit is contained in:
Gary van der Merwe
2008-01-08 19:04:40 +02:00
parent 41a1c72b4d
commit ccb9672b3b

View File

@@ -91,8 +91,12 @@ class ThreadPool(QtCore.QObject):
def stop(self):
for thread in self.threads:
thread.stop()
for queue in self.queues:
queue.unlock()
# FIXME: if a queue is in more than 1 thread, unlock will be called
# more than once.
for thread in self.threads:
for queue in thread.queues:
queue.unlock()
#for thread in self.threads:
# self.log.debug("Waiting for %r", thread)
# thread.wait()