From ec7a9a1f2027a12cb73e8c576635bd71ecfc0918 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 2 Dec 2017 12:59:33 +0200 Subject: [PATCH] uasyncio: README: Mention .awrite() and .aclose() methods vs asyncio. --- uasyncio/README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uasyncio/README.rst b/uasyncio/README.rst index ee9012a9..fb625b0f 100644 --- a/uasyncio/README.rst +++ b/uasyncio/README.rst @@ -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.