Lines Matching defs:Future
1 """A Future class similar to the one in PEP 3148."""
4 'Future', 'wrap_future', 'isfuture',
30 class Future:
31 """This class is *almost* compatible with concurrent.futures.Future.
61 # the Future protocol (i.e. is intended to be duck-type compatible).
66 # `await Future()` or`yield from Future()` (correct) vs.
67 # `yield Future()` (incorrect).
120 """Return the event loop the Future is bound to."""
123 raise RuntimeError("Future object is not initialized.")
127 """Create the CancelledError to raise if the Future is cancelled.
277 "and cannot be raised into a Future")
296 _PyFuture = Future
300 # Tries to call Future.get_loop() if it's available.
331 """Copy state from a future to a concurrent.futures.Future."""
346 """Internal helper to copy state from another Future.
348 The other Future may be a concurrent.futures.Future.
370 Compatible with both asyncio.Future and concurrent.futures.Future.
373 concurrent.futures.Future):
376 concurrent.futures.Future):
410 """Wrap concurrent.futures.Future object."""
413 assert isinstance(future, concurrent.futures.Future), \
414 f'concurrent.futures.Future is expected, got {future!r}'
428 Future = _CFuture = _asyncio.Future