summaryrefslogtreecommitdiff
path: root/extmod/uasyncio/event.py
diff options
context:
space:
mode:
authorDamien Tournoud <damien@platform.sh>2022-12-13 08:22:11 -0800
committerDamien George <damien@micropython.org>2022-12-14 13:25:24 +1100
commit0eba00a92cd422febff560f0f0d1b89f3d0c008f (patch)
treeb98b974943d2e09f7aae5a6e53291ca9a4be05e0 /extmod/uasyncio/event.py
parentb75b5c102c4e4197ff4ed6967070cbf9a5b63b92 (diff)
extmod/uasyncio: Fix syntax of generator functions.
The compiler is not picky right now, but these are actually all syntax errors: - await is only valid in an async function - async functions that use yield are actually async generators (a construct not supported by the compiler right now)
Diffstat (limited to 'extmod/uasyncio/event.py')
-rw-r--r--extmod/uasyncio/event.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/uasyncio/event.py b/extmod/uasyncio/event.py
index 3b5e79d8f..1525bcf3a 100644
--- a/extmod/uasyncio/event.py
+++ b/extmod/uasyncio/event.py
@@ -23,7 +23,8 @@ class Event:
def clear(self):
self.state = False
- async def wait(self):
+ # async
+ def wait(self):
if not self.state:
# Event not set, put the calling task on the event's waiting queue
self.waiting.push(core.cur_task)