'Initializes a new ThreadPoolExecutor instance.
Args:
max_workers: The maximum number of threads that can be used to
execute the given calls.'

def __init__(self, max_workers=None):

    if (max_workers is None):
        max_workers = ((cpu_count() or 1) * 5)
    if (max_workers <= 0):
        raise ValueError('max_workers    must    be    greater    than    0')
    self._max_workers = max_workers
    self._work_queue = queue.Queue()
    self._threads = set()
    self._shutdown = False
    self._shutdown_lock = threading.Lock()
