(self, nworkers, name="Pool")
:param nworkers: number of worker threads to start
        :type nworkers: integer
        :param name: prefix for the worker threads' name
        :type name: string
:param nworkers: number of worker threads to start
        :type nworkers: integer
        :param name: prefix for the worker threads' name
        :type name: string
: param nworkers : number of worker threads to start : type nworkers : integer : param name : prefix for the worker threads name : type name : string
def __init__(self, nworkers, name="Pool"):
        """
        :param nworkers: number of worker threads to start
        :type nworkers: integer
        :param name: prefix for the worker threads' name
        :type name: string
        """
        self._workq = queue.Queue()
        self._closed = False
        self._workers = []
        for idx in range(nworkers):
            thr = PoolWorker(self._workq, name="Worker-%s-%d" % (name, idx))
            try:
                thr.start()
            except:
                # If one thread has a problem, undo everything
                self.terminate()
                raise
            else:
                self._workers.append(thr)
def __init__ ( self , nworkers , name = "Pool" ) : self . _workq = queue . Queue ( ) self . _closed = False self . _workers = [ ] for idx in range ( nworkers ) : thr = PoolWorker ( self . _workq , name = "Worker-%s-%d" % ( name , idx ) ) try : thr . start ( ) except : # If one thread has a problem, undo everything self . terminate ( ) raise else : self . _workers . append ( thr )