diff options
Diffstat (limited to 'extmod/uasyncio/lock.py')
| -rw-r--r-- | extmod/uasyncio/lock.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extmod/uasyncio/lock.py b/extmod/uasyncio/lock.py index bddca295b..f50213d7c 100644 --- a/extmod/uasyncio/lock.py +++ b/extmod/uasyncio/lock.py @@ -22,8 +22,8 @@ class Lock: raise RuntimeError("Lock not acquired") if self.waiting.peek(): # Task(s) waiting on lock, schedule next Task - self.state = self.waiting.pop_head() - core._task_queue.push_head(self.state) + self.state = self.waiting.pop() + core._task_queue.push(self.state) else: # No Task waiting so unlock self.state = 0 @@ -31,7 +31,7 @@ class Lock: async def acquire(self): if self.state != 0: # Lock unavailable, put the calling Task on the waiting queue - self.waiting.push_head(core.cur_task) + self.waiting.push(core.cur_task) # Set calling task's data to the lock's queue so it can be removed if needed core.cur_task.data = self.waiting try: |
