class_docstr: A coroutine wrapped in a Future.
class_docstr_tok: ["A","coroutine","wrapped","in","a","Future","."]
code: def __wakeup(self, future):
      try:
          future.result()
      except BaseException as exc:
          # This may also be a cancellation.
          self.__step(exc)
      else:
          # Don't pass the value of `future.result()` explicitly,
          # as `Future.__iter__` and `Future.__await__` don't need it.
          # If we call `_step(value, None)` instead of `_step()`,
          # Python eval loop would use `.send(value)` method call,
          # instead of `__next__()`, which is slower for futures
          # that return non-generator iterators from their `__iter__`.
          self.__step()
      self = None
  
imports: import concurrent.futures
  import contextvars
  import functools
  import inspect
  import itertools
  import math
  import types
  import weakref
  from types import GenericAlias
  from .None import base_tasks
  from .None import coroutines
  from .None import events
  from .None import exceptions
  from .None import futures
  from .None import timeouts
label_desc: Use image node_id 18 for calling the Task obj's underlying member method code with example usage: obj.__wakeup(future) without return types