class_docstr: Placeholder for an asynchronous result.
  
  A ``Future`` encapsulates the result of an asynchronous
  operation.  In synchronous applications ``Futures`` are used
  to wait for the result from a thread or process pool; in
  Tornado they are normally used with `.IOLoop.add_future` or by
  yielding them in a `.gen.coroutine`.
  
  `tornado.concurrent.Future` is similar to
  `concurrent.futures.Future`, but not thread-safe (and therefore
  faster for use with single-threaded event loops).
  
  In addition to ``exception`` and ``set_exception``, methods ``exc_info``
  and ``set_exc_info`` are supported to capture tracebacks in Python 2.
  The traceback is automatically available in Python 3, but in the
  Python 2 futures backport this information is discarded.
  This functionality was previously available in a separate class
  ``TracebackFuture``, which is now a deprecated alias for this class.
  
  .. versionchanged:: 4.0
     `tornado.concurrent.Future` is always a thread-unsafe ``Future``
     with support for the ``exc_info`` methods.  Previously it would
     be an alias for the thread-safe `concurrent.futures.Future`
     if that package was available and fall back to the thread-unsafe
     implementation if it was not.
  
  .. versionchanged:: 4.1
     If a `.Future` contains an error but that error is never observed
     (by calling ``result()``, ``exception()``, or ``exc_info()``),
     a stack trace will be logged when the `.Future` is garbage collected.
     This normally indicates an error in the application, but in cases
     where it results in undesired logging it may be necessary to
     suppress the logging by ensuring that the exception is observed:
     ``f.add_done_callback(lambda f: f.exception())``.
code: def _set_done(self):
      self._done = True
      for cb in self._callbacks:
          try:
              cb(self)
          except Exception:
              app_log.exception(
                  "Exception in callback %r for %r", cb, self
              )
      self._callbacks = None
  
imports: from __future__ import absolute_import, division, print_function
  import functools
  import platform
  import textwrap
  import traceback
  import sys
  from tornado.log import app_log
  from tornado.stack_context import ExceptionStackContext, wrap
  from tornado.util import raise_exc_info, ArgReplacer, is_finalizing
label_desc: Use image node_id 15 for calling the Future obj's underlying member method code with example usage: obj._set_done() without return types