def __init__(self, message_queue, pool, name):
    # pyformat: disable
    """Initializer.

    This creates a new worker object for the ThreadPool class.

    Args:
      message_queue: A queue.Queue object used by the ThreadPool class to
        communicate with the workers. When a new task arrives, the ThreadPool
        notifies the workers by putting a message into this queue that has the
        format (target, args, name, queueing_time).

        target - A callable, the function to call.
        args - A tuple of positional arguments to target. Keyword arguments
               are not supported.
        name - A name for this task. If None, it will be unique generated by
               the threading library.
        queueing_time - The timestamp when this task was queued as returned by
                        time.time().

        Or, alternatively, the message in the queue can be STOP_MESSAGE
        which indicates that the worker should terminate.

      pool: The thread pool this worker belongs to.
      name: A name for this worker thread.
    """
    # pyformat: enable
    super(_WorkerThread, self).__init__(name=name)

    self.pool = pool
    self._queue = message_queue
    self.daemon = True
    self.idle = True
    self.started = time.time()
def __init__ ( self , message_queue , pool , name ) : super ( _WorkerThread , self ) . __init__ ( name = name ) self . pool = pool self . _queue = message_queue self . daemon = True self . idle = True self . started = time . time ( )
Initializer.

    This creates a new worker object for the ThreadPool class.

    Args:
      message_queue: A queue.Queue object used by the ThreadPool class to
        communicate with the workers. When a new task arrives, the ThreadPool
        notifies the workers by putting a message into this queue that has the
        format (target, args, name, queueing_time).

        target - A callable, the function to call.
        args - A tuple of positional arguments to target. Keyword arguments
               are not supported.
        name - A name for this task. If None, it will be unique generated by
               the threading library.
        queueing_time - The timestamp when this task was queued as returned by
                        time.time().

        Or, alternatively, the message in the queue can be STOP_MESSAGE
        which indicates that the worker should terminate.

      pool: The thread pool this worker belongs to.
      name: A name for this worker thread.