docs/library/uasyncio: Consistently use "uasyncio" instead of "asyncio".

pull/8195/head^2
Luiz Brandao 2022-04-14 12:24:35 -04:00 zatwierdzone przez Damien George
rodzic 3d58bb23c2
commit 7861eddd0f
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -71,9 +71,9 @@ Additional functions
than *timeout* seconds. If *awaitable* is not a task then a task will be than *timeout* seconds. If *awaitable* is not a task then a task will be
created from it. created from it.
If a timeout occurs, it cancels the task and raises ``asyncio.TimeoutError``: If a timeout occurs, it cancels the task and raises ``uasyncio.TimeoutError``:
this should be trapped by the caller. The task receives this should be trapped by the caller. The task receives
``asyncio.CancelledError`` which may be ignored or trapped using ``try...except`` ``uasyncio.CancelledError`` which may be ignored or trapped using ``try...except``
or ``try...finally`` to run cleanup code. or ``try...finally`` to run cleanup code.
Returns the return value of *awaitable*. Returns the return value of *awaitable*.
@ -108,7 +108,7 @@ class Task
.. method:: Task.cancel() .. method:: Task.cancel()
Cancel the task by injecting ``asyncio.CancelledError`` into it. The task may Cancel the task by injecting ``uasyncio.CancelledError`` into it. The task may
ignore this exception. Cleanup code may be run by trapping it, or via ignore this exception. Cleanup code may be run by trapping it, or via
``try ... finally``. ``try ... finally``.
@ -148,7 +148,7 @@ class ThreadSafeFlag
.. class:: ThreadSafeFlag() .. class:: ThreadSafeFlag()
Create a new flag which can be used to synchronise a task with code running Create a new flag which can be used to synchronise a task with code running
outside the asyncio loop, such as other threads, IRQs, or scheduler outside the uasyncio loop, such as other threads, IRQs, or scheduler
callbacks. Flags start in the cleared state. callbacks. Flags start in the cleared state.
.. method:: ThreadSafeFlag.set() .. method:: ThreadSafeFlag.set()