extmod/uasyncio: Add asyncio.current_task().

Matches CPython behavior.

Fixes #6686
This commit is contained in:
Jim Mussared
2021-02-12 14:11:18 +11:00
committed by Damien George
parent d128999938
commit 7ed99544e4
4 changed files with 34 additions and 0 deletions

View File

@@ -264,6 +264,10 @@ def get_event_loop(runq_len=0, waitq_len=0):
return Loop
def current_task():
return cur_task
def new_event_loop():
global _task_queue, _io_queue
# TaskQueue of Task instances