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)
This commit is contained in:
committed by
Damien George
parent
b75b5c102c
commit
0eba00a92c
@@ -28,7 +28,8 @@ class Lock:
|
||||
# No Task waiting so unlock
|
||||
self.state = 0
|
||||
|
||||
async def acquire(self):
|
||||
# async
|
||||
def acquire(self):
|
||||
if self.state != 0:
|
||||
# Lock unavailable, put the calling Task on the waiting queue
|
||||
self.waiting.push(core.cur_task)
|
||||
|
||||
Reference in New Issue
Block a user