Skip to content

Commit

Permalink
also await loop.shutdown_asyncgens
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Jan 22, 2025
1 parent 6b4ff30 commit bec1c0e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nbsite/pyodide/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ async def event_loop():
js, js_exports, js_modules, css, global_exports = extract_extensions(code)
pipe.send((content, mime_type, stdout.getvalue(), stderr.getvalue(), js, js_exports, js_modules, css, global_exports))
loop = asyncio.get_running_loop()
await loop.shutdown_asyncgens()
await loop.shutdown_default_executor()
cur_task = asyncio.current_task()
await asyncio.gather(*(t for t in asyncio.all_tasks() if t is not cur_task), return_exceptions=True)
Expand Down

0 comments on commit bec1c0e

Please sign in to comment.