class_docstr: Asynchronous result.
docstr: Wrap a future object and register callbacks.
docstr_tok: ["Wrap","a","future","object","and","register","callbacks","."]
code: def __init__(self, future, callback=None, error_callback=None):
      """Wrap a future object and register callbacks."""
      self.future = future
      self._event = _threading.Event()
      done_cb = _functools.partial(
          _async_future_callback,
          event=self._event,
          callback=callback,
          error_callback=error_callback,
      )
      self.future.add_done_callback(done_cb)
  
imports: from os import cpu_count
  import functools
  import operator
  import threading
  import warnings
  import weakref
  from ..None import futures
label_desc: Use image node_id 1 to create a new AsyncResult object  with example: obj = AsyncResult(future, callback, error_callback)