torch.futures
This package provides a "Future" type that encapsulates an
asynchronous execution and a set of utility functions to simplify
operations on "Future" objects. Currently, the "Future" type is
primarily used by the Distributed RPC Framework.
class torch.futures.Future(*, devices=None)
Wrapper around a "torch._C.Future" which encapsulates an
   asynchronous execution of a callable, e.g. "rpc_async()". It also
   exposes a set of APIs to add callback functions and set results.
Warning:
 GPU support is a beta feature, subject to changes.

add_done_callback(callback)
  Append the given callback function to this "Future", which will
  be run when the "Future" is completed.  Multiple callbacks can
  be added to the same "Future", but the order in which they will
  be executed cannot be guaranteed. The callback must take one
  argument, which is the reference to this "Future". The callback
