Lines Matching refs:futures
12 import concurrent.futures
23 from . import futures
41 if futures._get_loop(t) is loop and not t.done()}
52 return {t for t in list(_all_tasks) if futures._get_loop(t) is loop}
55 class Task(futures._PyFuture): # Inherit Python Task implementation
120 if self._state == futures._PENDING and self._log_destroy_pending:
208 raise futures.InvalidStateError(
211 if not isinstance(exc, futures.CancelledError):
212 exc = futures.CancelledError()
230 super().set_exception(futures.CancelledError())
233 except futures.CancelledError:
244 if futures._get_loop(result) is not self._loop:
330 FIRST_COMPLETED = concurrent.futures.FIRST_COMPLETED
331 FIRST_EXCEPTION = concurrent.futures.FIRST_EXCEPTION
332 ALL_COMPLETED = concurrent.futures.ALL_COMPLETED
351 if futures.isfuture(fs) or coroutines.iscoroutine(fs):
397 raise futures.TimeoutError()
410 except futures.CancelledError:
423 raise futures.TimeoutError()
506 if futures.isfuture(fs) or coroutines.iscoroutine(fs):
532 raise futures.TimeoutError
565 futures._set_result_unless_cancelled,
585 elif futures.isfuture(coro_or_future):
586 if loop is not None and loop is not futures._get_loop(coro_or_future):
606 class _GatheringFuture(futures.Future):
679 exc = futures.CancelledError()
698 res = futures.CancelledError()
709 outer.set_exception(futures.CancelledError())
721 loop = futures._get_loop(fut)
773 loop = futures._get_loop(inner)
803 future = concurrent.futures.Future()
807 futures._chain_future(ensure_future(coro, loop=loop), future)