code: def enqueue(self, method, *args, **kwargs):
          
          if not hasattr(method, "__call__"):
              raise ValueError(
                  "{0} has no __call__ member.".format(method.__name__)
              )
  
          # Prepare the future result object
          future = FutureResult(self._logger)
  
          # Use a lock, as we might be "resetting" the queue
          with self.__lock:
              # Add the task to the queue
              self._queue.put((method, args, kwargs, future), True, self._timeout)
              self.__nb_pending_task += 1
  
              if self.__nb_pending_task > self.__nb_threads:
                  # All threads are taken: start a new one
                  self.__start_thread()
  
          return future
docs: Queues a task in the pool
  
          :param method: Method to call
          :return: A FutureResult object, to get the result of the task
          :raise ValueError: Invalid method
          :raise Full: The task queue is full