Skip to content

fix(asyncio): do not deadlock in atexit handler#3056

Merged
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3004
Apr 30, 2026
Merged

fix(asyncio): do not deadlock in atexit handler#3056
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3004

Conversation

@dgozman
Copy link
Copy Markdown
Contributor

@dgozman dgozman commented Apr 30, 2026

Summary

  • transport.run() now resolves _stopped_future from a finally block, so cancellation by asyncio.run()'s shutdown phase no longer strands wait_until_stopped() waiters.
  • Adds a regression test using asyncio_atexit (added to local-requirements.txt).

Fixes #3004

@dgozman dgozman merged commit 67e59f5 into microsoft:main Apr 30, 2026
74 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: playwright.stop() deadlocks when used with asyncio-atexit

2 participants