diff options
Diffstat (limited to 'extmod')
-rw-r--r-- | extmod/uasyncio/__init__.py | 1 | ||||
-rw-r--r-- | extmod/uasyncio/core.py | 2 | ||||
-rw-r--r-- | extmod/uasyncio/event.py | 1 | ||||
-rw-r--r-- | extmod/uasyncio/lock.py | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/extmod/uasyncio/__init__.py b/extmod/uasyncio/__init__.py index fa64438f6b..373de52af4 100644 --- a/extmod/uasyncio/__init__.py +++ b/extmod/uasyncio/__init__.py @@ -18,6 +18,7 @@ _attrs = { "StreamWriter": "stream", } + # Lazy loader, effectively does: # global attr # from .mod import attr diff --git a/extmod/uasyncio/core.py b/extmod/uasyncio/core.py index 10a310809c..f191d202e2 100644 --- a/extmod/uasyncio/core.py +++ b/extmod/uasyncio/core.py @@ -30,6 +30,7 @@ _exc_context = {"message": "Task exception wasn't retrieved", "exception": None, ################################################################################ # Sleep functions + # "Yield" once, then raise StopIteration class SingletonGenerator: def __init__(self): @@ -132,6 +133,7 @@ class IOQueue: ################################################################################ # Main run loop + # Ensure the awaitable is a task def _promote_to_task(aw): return aw if isinstance(aw, Task) else create_task(aw) diff --git a/extmod/uasyncio/event.py b/extmod/uasyncio/event.py index 1525bcf3a9..43d47eb5f0 100644 --- a/extmod/uasyncio/event.py +++ b/extmod/uasyncio/event.py @@ -3,6 +3,7 @@ from . import core + # Event class for primitive events that can be waited on, set, and cleared class Event: def __init__(self): diff --git a/extmod/uasyncio/lock.py b/extmod/uasyncio/lock.py index 4dae36bc2b..85a9437b4f 100644 --- a/extmod/uasyncio/lock.py +++ b/extmod/uasyncio/lock.py @@ -3,6 +3,7 @@ from . import core + # Lock class for primitive mutex capability class Lock: def __init__(self): |