Update nest-asyncio/README.md
This commit is contained in:
@@ -6,7 +6,7 @@ def _run_once(loop):
|
||||
task = (tasks := asyncio.tasks._current_tasks).pop(loop, None)
|
||||
handle._run(); tasks[loop] = task
|
||||
(loop := asyncio.get_event_loop()).__class__._run_once = _run_once
|
||||
loop.__class__._check_running = lambda _: 0; asyncio.run = loop.run_until_complete
|
||||
asyncio.run = loop.run_until_complete; loop.__class__._check_running = lambda _: 0
|
||||
|
||||
async def hello():
|
||||
print('hello')
|
||||
|
||||
Reference in New Issue
Block a user