'Initializes a new ThreadPoolExecutor instance.
Args:
max_workers: The maximum number of threads that can be used to
execute the given calls.
thread_name_prefix: An optional name prefix to give our threads.'

def __init__(self, max_workers=None, thread_name_prefix=''):

    if (max_workers is None):
        max_workers = ((os.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()
    self._thread_name_prefix = (thread_name_prefix or ('ThreadPoolExecutor-%d' % self._counter()))
