Lines Matching refs:asynchronous
214 clause may be used to iterate over a :term:`asynchronous iterator`.
221 :dfn:`asynchronous comprehension`. An asynchronous comprehension may
383 :dfn:`asynchronous generator expression`. An asynchronous generator
384 expression returns a new asynchronous generator object,
385 which is an asynchronous iterator (see :ref:`async-iterators`).
391 Prior to Python 3.7, asynchronous generator expressions could
393 with 3.7, any function can use asynchronous generator expressions.
415 or an :term:`asynchronous generator` function and
419 coroutine function to be an asynchronous generator. For example::
424 async def agen(): # defines an asynchronous generator function
437 Generator functions are described below, while asynchronous generator
439 :ref:`asynchronous-generator-functions`.
617 :term:`asynchronous generator` function.
619 When an asynchronous generator function is called, it returns an
620 asynchronous iterator known as an asynchronous generator object.
622 An asynchronous generator object is typically used in an
626 Calling one of the asynchronous generator's methods returns an
634 is resumed by awaiting on the next object returned by the asynchronous
642 In an asynchronous generator function, yield expressions are allowed anywhere
643 in a :keyword:`try` construct. However, if an asynchronous generator is not
648 scheduler running the asynchronous generator to call the asynchronous
654 a *finalizer* function which takes an asynchronous generator-iterator
657 When first iterated over, an asynchronous generator-iterator will store the
663 asynchronous generator function.
665 .. index:: object: asynchronous-generator
671 This subsection describes the methods of an asynchronous generator iterator,
679 Returns an awaitable which when run starts to execute the asynchronous
681 asynchronous generator function is resumed with a :meth:`~agen.__anext__`
686 the completing coroutine. If the asynchronous generator exits without
688 :exc:`StopAsyncIteration` exception, signalling that the asynchronous
697 asynchronous generator. As with the :meth:`~generator.send()` method for a
698 generator, this "sends" a value into the asynchronous generator function,
703 asynchronous generator exits without yielding another value. When
704 :meth:`asend` is called to start the asynchronous
712 where the asynchronous generator was paused, and returns the next value
714 :exc:`StopIteration` exception. If the asynchronous generator exits
727 the asynchronous generator function at the point where it was paused.
728 If the asynchronous generator function then exits gracefully, is already
731 Any further awaitables returned by subsequent calls to the asynchronous
733 asynchronous generator yields a value, a :exc:`RuntimeError` is raised
734 by the awaitable. If the asynchronous generator raises any other exception,
735 it is propagated to the caller of the awaitable. If the asynchronous