Lines Matching refs:asynchronous

190 clause may be used to iterate over a :term:`asynchronous iterator`.
197 :dfn:`asynchronous comprehension`. An asynchronous comprehension may
331 as with an asynchronous comprehension. If a generator expression
333 it is called an :dfn:`asynchronous generator expression`.
334 An asynchronous generator expression yields a new asynchronous
335 generator object, which is an asynchronous iterator
353 or an :term:`asynchronous generator` function and
357 coroutine function to be an asynchronous generator. For example::
362 async def agen(): # defines an asynchronous generator function (PEP 525)
365 Generator functions are described below, while asynchronous generator
367 :ref:`asynchronous-generator-functions`.
538 :term:`asynchronous generator` function.
540 When an asynchronous generator function is called, it returns an
541 asynchronous iterator known as an asynchronous generator object.
543 An asynchronous generator object is typically used in an
547 Calling one of the asynchronous generator's methods returns an
555 is resumed by awaiting on the next object returned by the asynchronous
563 In an asynchronous generator function, yield expressions are allowed anywhere
564 in a :keyword:`try` construct. However, if an asynchronous generator is not
569 scheduler running the asynchronous generator to call the asynchronous
575 a *finalizer* function which takes an asynchronous generator-iterator
578 When first iterated over, an asynchronous generator-iterator will store the
584 asynchronous generator function.
586 .. index:: object: asynchronous-generator
592 This subsection describes the methods of an asynchronous generator iterator,
600 Returns an awaitable which when run starts to execute the asynchronous
602 asynchronous generator function is resumed with a :meth:`~agen.__anext__`
607 the completing coroutine. If the asynchronous generator exits without
609 :exc:`StopAsyncIteration` exception, signalling that the asynchronous
618 asynchronous generator. As with the :meth:`~generator.send()` method for a
619 generator, this "sends" a value into the asynchronous generator function,
624 asynchronous generator exits without yielding another value. When
625 :meth:`asend` is called to start the asynchronous
633 where the asynchronous generator was paused, and returns the next value
635 :exc:`StopIteration` exception. If the asynchronous generator exits
648 the asynchronous generator function at the point where it was paused.
649 If the asynchronous generator function then exits gracefully, is already
652 Any further awaitables returned by subsequent calls to the asynchronous
654 asynchronous generator yields a value, a :exc:`RuntimeError` is raised
655 by the awaitable. If the asynchronous generator raises any other exception,
656 it is propagated to the caller of the awaitable. If the asynchronous