mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
docs: Add asyncio source code links (GH-16640)
This commit is contained in:
parent
320dd504dd
commit
f900064ac4
11 changed files with 54 additions and 4 deletions
|
@ -18,9 +18,9 @@ and Tasks.
|
|||
Coroutines
|
||||
==========
|
||||
|
||||
Coroutines declared with async/await syntax is the preferred way of
|
||||
writing asyncio applications. For example, the following snippet
|
||||
of code (requires Python 3.7+) prints "hello", waits 1 second,
|
||||
:term:`Coroutines <coroutine>` declared with the async/await syntax is the
|
||||
preferred way of writing asyncio applications. For example, the following
|
||||
snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
|
||||
and then prints "world"::
|
||||
|
||||
>>> import asyncio
|
||||
|
@ -240,6 +240,10 @@ Running an asyncio Program
|
|||
.. versionchanged:: 3.9
|
||||
Updated to use :meth:`loop.shutdown_default_executor`.
|
||||
|
||||
.. note::
|
||||
The source code for ``asyncio.run()`` can be found in
|
||||
:source:`Lib/asyncio/runners.py`.
|
||||
|
||||
Creating Tasks
|
||||
==============
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue