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

def __init__(self, max_workers):

    _remove_dead_thread_references()
    self._max_workers = max_workers
    self._work_queue = queue.Queue()
    self._threads = set()
    self._shutdown = False
    self._shutdown_lock = threading.Lock()
