uasyncio: README: Mention .awrite() and .aclose() methods vs asyncio.

pull/221/merge
Paul Sokolovsky 2017-12-02 12:59:33 +02:00
rodzic f8c403ef4f
commit ec7a9a1f20
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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.