Skip to content

Commit da124ac

Browse files
committed
uasyncio: Release 1.2.3, added initial README.
1 parent 04bd085 commit da124ac

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

uasyncio/README.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
uasyncio
2+
========
3+
4+
uasyncio is MicroPython's asynchronous sheduling library, roughly
5+
modeled after CPython's asyncio.
6+
7+
uasyncio doesn't use naive always-iterating scheduling algorithm,
8+
but performs a real time-based scheduling, which allows it (and
9+
thus the whole system) to sleep when there is nothing to do (actual
10+
implementation of that depends on I/O scheduling algorithm which
11+
actually performs the wait operation).
12+
13+
Major conceptual differences to asyncio:
14+
15+
* Avoids defining a notion of Future, and especially wrapping coroutines
16+
in Futures, like CPython asyncio does. uasyncio works directly with
17+
coroutines (and callbacks).
18+
* uasyncio uses wrap-around millisecond timebase (as native to all
19+
MicroPython ports.)
20+
* Instead of single large package, number of subpackages are provided
21+
(each installable separately).
22+
23+
Specific differences:
24+
25+
* For millisecond scheduling, ``loop.call_later_ms()`` and
26+
``uasyncio.sleep_ms()`` are provided.
27+
* As there's no monotonic time, ``loop.call_at()`` is not provided.
28+
Instead, there's ``loop.call_at_()`` which is considered an internal
29+
function and has slightly different signature.
30+
* ``call_*`` funcions don't return Handle and callbacks scheduled by
31+
them aren't cancellable. If they need to be cancellable, they should
32+
accept an object as an argument, and a "cancel" flag should be set
33+
in the object, for a callback to test.
34+
* ``Future`` object is not available.
35+
* ``ensure_future()`` and ``Task()`` perform just scheduling operations
36+
and return a native coroutine, not Future/Task objects.
37+
* Some other functions are not (yet) implemented.

uasyncio/metadata.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
srctype = micropython-lib
22
type = package
3-
version = 1.2.2
3+
version = 1.2.3
44
author = Paul Sokolovsky
5-
long_desc = Lightweight asyncio-like library built around native Python coroutines, not around un-Python devices like callback mess.
5+
desc = Lightweight asyncio-like library for MicroPython, built around native Python coroutines.
6+
long_desc = README.rst
67
depends = uasyncio.core

uasyncio/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import optimize_upip
88

99
setup(name='micropython-uasyncio',
10-
version='1.2.2',
11-
description='uasyncio module for MicroPython',
12-
long_description='Lightweight asyncio-like library built around native Python coroutines, not around un-Python devices like callback mess.',
10+
version='1.2.3',
11+
description='Lightweight asyncio-like library for MicroPython, built around native Python coroutines.',
12+
long_description=open('README.rst').read(),
1313
url='https://github.com/micropython/micropython-lib',
1414
author='Paul Sokolovsky',
1515
author_email='[email protected]',

0 commit comments

Comments
 (0)