'Create a new threadpool.
@param minthreads: minimum number of threads in the pool
@type minthreads: L{int}
@param maxthreads: maximum number of threads in the pool
@type maxthreads: L{int}
@param name: The name to give this threadpool; visible in log messages.
@type name: native L{str}'

def __init__(self, minthreads=5, maxthreads=20, name=None):

    assert (minthreads >= 0), 'minimum    is    negative'
    assert (minthreads <= maxthreads), 'minimum    is    greater    than    maximum'
    self.min = minthreads
    self.max = maxthreads
    self.name = name
    self.threads = []
    def trackingThreadFactory(*a, **kw):
        thread = self.threadFactory(name=self._generateName(), *a, **kw)
        self.threads.append(thread)
        return thread
    def currentLimit():
        if (not self.started):
            return 0
        return self.max
    self._team = self._pool(currentLimit, trackingThreadFactory)
