Commit bc66671c authored by U. Artie Eoff's avatar U. Artie Eoff Committed by Chad Versace

Remove ThreadPools

Remove ThreadPools from threads module since it is no longer
needed/used.  ConcurrentTestPool is now the only threadpool needed
to manage cpu-only tests.
Reviewed-by: default avatarChad Versace <>
parent 7b95d521
......@@ -56,41 +56,3 @@ class ConcurrentTestPool(Singleton):
def join(self):
class ThreadPools(Singleton):
def init(self):
self.threadpools = dict() # {name : threadpool}
self.create("base", 1)
def lookup(self, name):
return self.threadpools.get(name, None)
def create(self, name, count = 2):
if self.lookup(name) is None:
self.threadpools[name] = ThreadPool(count)
raise RuntimeWarning, "ThreadPool '%s' has already been created." % name
def put(self, callable_, args = None, kwds = None, name = "base"):
pool = self.lookup(name)
if pool is None:
raise RuntimeError, "ThreadPool '%s' does not exist." % name
callable_, args = args, kwds = kwds
def joinAll(self):
pools = list(self.threadpools.itervalues())
for pool in pools:
except KeyboardInterrupt:
pools = list(self.threadpools.itervalues())
for pool in pools:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment