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

        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.
        
tensorpack/predict/concurrency.py