]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/threadpool.py
Improve file headers in threadpool.py and cruft.py.
[dak.git] / daklib / threadpool.py
index f075f5c380c8907959103b2d33ebe9d174270f30..f1b68ce2e9bb4088222e2b0227a9793fafadafcd 100644 (file)
@@ -1,19 +1,21 @@
-import threading
-from time import sleep
+"""
+thread pool implementation for Python
 
-from daklib.config import Config
+@contact: Debian FTPMaster <ftpmaster@debian.org>
+@copyright: 2003 Tim Lesher
+@copyright: 2004 Carl Kleffner
+@copyright: 2010, 2011 Torsten Werner <twerner@debian.org>
+"""
 
 # This code is a modified copy of
 # http://code.activestate.com/recipes/203871-a-generic-programming-thread-pool/
 # and is licensed under the Python License. The full text of the license
 # is available in the file COPYING-PSF.
 
-# Ensure booleans exist (not needed for Python 2.2.1 or higher)
-try:
-    True
-except NameError:
-    False = 0
-    True = not False
+import threading
+from time import sleep
+
+from daklib.config import Config
 
 if Config().has_key('Common::ThreadCount'):
     defaultThreadCount = int(Config()['Common::ThreadCount'])