def killWorker(self,num = 1):
        """ Kill workers.
            num = number of workers to kill.
        """
        self.countLock.acquire()
        if num > self.workers:
            num = self.workers
        self.countLock.release()
        for x in xrange(num):
            self.tasks.put("exit")
 Kill workers.
            num = number of workers to kill.
        
recipes/Python/576910_Thread_pool_grows_on_demand/recipe-576910.py