kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: README: Mention .awrite() and .aclose() methods vs asyncio.
rodzic
f8c403ef4f
commit
ec7a9a1f20
|
@ -15,6 +15,7 @@ Major conceptual differences to asyncio:
|
|||
* Avoids defining a notion of Future, and especially wrapping coroutines
|
||||
in Futures, like CPython asyncio does. uasyncio works directly with
|
||||
coroutines (and callbacks).
|
||||
* Methods provided are more consistently coroutines.
|
||||
* uasyncio uses wrap-around millisecond timebase (as native to all
|
||||
MicroPython ports.)
|
||||
* Instead of single large package, number of subpackages are provided
|
||||
|
@ -35,3 +36,8 @@ Specific differences:
|
|||
* ``ensure_future()`` and ``Task()`` perform just scheduling operations
|
||||
and return a native coroutine, not Future/Task objects.
|
||||
* Some other functions are not (yet) implemented.
|
||||
* StreamWriter method(s) are coroutines. While in CPython asyncio,
|
||||
StreamWriter.write() is a normal function (which potentially buffers
|
||||
unlimited amount of data), uasyncio offers coroutine StreamWriter.awrite()
|
||||
instead. Also, both StreamReader and StreamWriter have .aclose()
|
||||
coroutine method.
|
||||
|
|
Ładowanie…
Reference in New Issue