def set_max_workers(self, nb):
        """
        Set the maximum workers to create.
        """
        self.count_lock.acquire()
        self.max_workers = nb
        if self.workers > self.max_workers:
            self.kill(self.workers - self.max_workers)
        self.count_lock.release()
def set_max_workers ( self , nb ) : self . count_lock . acquire ( ) self . max_workers = nb if self . workers > self . max_workers : self . kill ( self . workers - self . max_workers ) self . count_lock . release ( )
Set the maximum workers to create.