class_docstr: An multithreaded online async predictor which runs a list of OnlinePredictor.
  It would do an extra batching internally.
class_docstr_tok: ["An","multithreaded","online","async","predictor","which","runs","a","list","of","OnlinePredictor",".","It","would","do","an","extra","batching","internally","."]
docstr: Args:
      dp (list): A datapoint as inputs. It could be either batched or not
          batched depending on the predictor implementation).
      callback: a thread-safe callback. When the results are ready, it will be called
          with the "future" object.
  Returns:
      concurrent.futures.Future: a Future of results.
docstr_tok: ["Args",":","dp","(","list",")",":","A","datapoint","as","inputs",".","It","could","be","either","batched","or","not","batched","depending","on","the","predictor","implementation",")",".","callback",":","a","thread-safe","callback",".","When","the","results","are","ready",",","it","will","be","called","with","the","``","future","''","object",".","Returns",":","concurrent.futures.Future",":","a","Future","of","results","."]
code: def put_task(self, dp, callback=None):
      """
      Args:
          dp (list): A datapoint as inputs. It could be either batched or not
              batched depending on the predictor implementation).
          callback: a thread-safe callback. When the results are ready, it will be called
              with the "future" object.
      Returns:
          concurrent.futures.Future: a Future of results.
      """
      f = Future()
      if callback is not None:
          f.add_done_callback(callback)
      self.input_queue.put((dp, f))
      return f
  
imports: import multiprocessing
  import numpy
  from concurrent.futures import Future
  import tensorflow
  from six.moves import queue, range
  from ..compat import tfv1
  from ..tfutils.model_utils import describe_trainable_vars
  from ..utils import logger
  from ..utils.concurrency import DIE, ShareSessionThread, StoppableThread
  from .base import AsyncPredictorBase, OfflinePredictor, OnlinePredictor
label_desc: Use image node_id 3 for calling the MultiThreadAsyncPredictor obj's underlying member method code with example usage: obj.put_task(dp, callback) and returns: f