Skip to content

Commit dfeb18c

Browse files
committed
TUTORIAL.md: Rename uasyncio. Add note re task references.
1 parent 2337452 commit dfeb18c

File tree

3 files changed

+134
-133
lines changed

3 files changed

+134
-133
lines changed

v3/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# 1. Guide to uasyncio
1+
# 1. Guide to asyncio
22

3-
MicroPython's `uasyncio` is pre-installed on all platforms except severely
3+
MicroPython's `asyncio` is pre-installed on all platforms except severely
44
constrained ones such as the 1MB ESP8266. It supports CPython 3.8 syntax and
55
aims to be a compatible subset of `asyncio`. The current version is 3.0.0.
66

77
## 1.1 Documents
88

9-
[uasyncio official docs](http://docs.micropython.org/en/latest/library/asyncio.html)
9+
[asyncio official docs](http://docs.micropython.org/en/latest/library/asyncio.html)
1010

1111
[Tutorial](./docs/TUTORIAL.md) Intended for users with all levels of experience
1212
of asynchronous programming, including beginners.
@@ -16,26 +16,26 @@ describes device drivers for switches, pushbuttons, ESP32 touch buttons, ADC's
1616
and incremental encoders.
1717

1818
[Interrupts](https://github.com/peterhinch/micropython-async/blob/master/v3/docs/INTERRUPTS.md)
19-
is a guide to interfacing interrupts to `uasyncio`.
19+
is a guide to interfacing interrupts to `asyncio`.
2020

2121
[Event-based programming](./docs/EVENTS.md) is a guide to a way of writing
2222
applications and device drivers which largely does away with callbacks. The doc
23-
assumes some knowledge of `uasyncio`.
23+
assumes some knowledge of `asyncio`.
2424

2525
[Threading](./docs/THREADING.md) is a guide to the use of multi-threaded and
26-
multi-core programming. Code is offered to enable a `uasyncio` application to
26+
multi-core programming. Code is offered to enable a `asyncio` application to
2727
deal with blocking functions.
2828

2929
## 1.2 Debugging tools
3030

3131
[aiorepl](https://github.com/micropython/micropython-lib/tree/master/micropython/aiorepl)
3232
This official tool enables an application to launch a REPL which is active
3333
while the application is running. From this you can modify and query the
34-
application and run `uasyncio` scripts concurrently with the running
34+
application and run `asyncio` scripts concurrently with the running
3535
application.
3636

3737
[monitor](https://github.com/peterhinch/micropython-monitor) enables a running
38-
`uasyncio` application to be monitored using a Pi Pico, ideally with a scope or
38+
`asyncio` application to be monitored using a Pi Pico, ideally with a scope or
3939
logic analyser. Normally requires only one GPIO pin on the target.
4040

4141
![Image](https://github.com/peterhinch/micropython-monitor/raw/master/images/monitor.jpg)
@@ -58,14 +58,14 @@ Documented in the [tutorial](./docs/TUTORIAL.md). Comprises:
5858
### 1.3.3 Threadsafe primitives
5959

6060
[This doc](https://github.com/peterhinch/micropython-async/blob/master/v3/docs/THREADING.md)
61-
describes issues linking `uasyncio` code with code running on other cores or in
61+
describes issues linking `asyncio` code with code running on other cores or in
6262
other threads. The `threadsafe` directory provides:
6363

6464
* A threadsafe primitive `Message`.
6565
* `ThreadSafeQueue`
6666
* `ThreadSafeEvent` Extends `ThreadsafeFlag`.
6767

68-
The doc also provides code to enable `uasyncio` to handle blocking functions
68+
The doc also provides code to enable `asyncio` to handle blocking functions
6969
using threading.
7070

7171
### 1.3.4 Asynchronous device drivers
@@ -101,24 +101,24 @@ useful in their own right:
101101

102102
These notes are intended for users familiar with `asyncio` under CPython.
103103

104-
The MicroPython language is based on CPython 3.4. The `uasyncio` library now
104+
The MicroPython language is based on CPython 3.4. The `asyncio` library now
105105
supports a subset of the CPython 3.8 `asyncio` library. There are non-standard
106106
extensions to optimise services such as millisecond level timing. Its design
107107
focus is on high performance. Scheduling runs without RAM allocation.
108108

109-
The `uasyncio` library supports the following features:
109+
The `asyncio` library supports the following features:
110110

111111
* `async def` and `await` syntax.
112112
* Awaitable classes (using `__iter__` rather than `__await__`).
113113
* Asynchronous context managers.
114114
* Asynchronous iterators.
115-
* `uasyncio.sleep(seconds)`.
116-
* Timeouts (`uasyncio.wait_for`).
115+
* `asyncio.sleep(seconds)`.
116+
* Timeouts (`asyncio.wait_for`).
117117
* Task cancellation (`Task.cancel`).
118118
* Gather.
119119

120120
It supports millisecond level timing with the following:
121-
* `uasyncio.sleep_ms(time)`
121+
* `asyncio.sleep_ms(time)`
122122

123123
It includes the following CPython compatible synchronisation primitives:
124124
* `Event`.

0 commit comments

Comments
 (0)