parameters: (self, max_workers=None, thread_name_prefix='',
                   initializer=None, initargs=())
docstring: 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.
              initializer: A callable used to initialize worker threads.
              initargs: A tuple of arguments to pass to the initializer.
docstring_summary: Initializes a new ThreadPoolExecutor instance.
docstring_tokens: Initializes a new ThreadPoolExecutor instance .
function: def __init__(self, max_workers=None, thread_name_prefix='',
                   initializer=None, initargs=()):
          """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.
              initializer: A callable used to initialize worker threads.
              initargs: A tuple of arguments to pass to the initializer.
          """
          if max_workers is None:
              # Use this number because ThreadPoolExecutor is often
              # used to overlap I/O instead of CPU work.
              max_workers = (os.cpu_count() or 1) * 5
          if max_workers <= 0:
              raise ValueError("max_workers must be greater than 0")
  
          if initializer is not None and not callable(initializer):
              raise TypeError("initializer must be a callable")
  
          self._max_workers = max_workers
          self._work_queue = queue.SimpleQueue()
          self._threads = set()
          self._broken = False
          self._shutdown = False
          self._shutdown_lock = threading.Lock()
          self._thread_name_prefix = (thread_name_prefix or
                                      ("ThreadPoolExecutor-%d" % self._counter()))
          self._initializer = initializer
          self._initargs = initargs
function_tokens: def __init__ ( self , max_workers = None , thread_name_prefix = '' , initializer = None , initargs = ( ) ) : if max_workers is None : # Use this number because ThreadPoolExecutor is often # used to overlap I/O instead of CPU work. max_workers = ( os . cpu_count ( ) or 1 ) * 5 if max_workers <= 0 : raise ValueError ( "max_workers must be greater than 0" ) if initializer is not None and not callable ( initializer ) : raise TypeError ( "initializer must be a callable" ) self . _max_workers = max_workers self . _work_queue = queue . SimpleQueue ( ) self . _threads = set ( ) self . _broken = False self . _shutdown = False self . _shutdown_lock = threading . Lock ( ) self . _thread_name_prefix = ( thread_name_prefix or ( "ThreadPoolExecutor-%d" % self . _counter ( ) ) ) self . _initializer = initializer self . _initargs = initargs