gh-157025: Fix transport cleanup when cancelling asyncio native sendfile by lpyu001 · Pull Request #157027 · python/cpython · GitHub
Skip to content

gh-157025: Fix transport cleanup when cancelling asyncio native sendfile - #157027

Open
lpyu001 wants to merge 2 commits into
python:mainfrom
lpyu001:asyncio
Open

gh-157025: Fix transport cleanup when cancelling asyncio native sendfile#157027
lpyu001 wants to merge 2 commits into
python:mainfrom
lpyu001:asyncio

Conversation

@lpyu001

@lpyu001 lpyu001 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Ensure cancellation while native sendfile waits for the write buffer to drain resets the empty waiter, restores the prior reading state, and restores the selector transport registry entry.

… sendfile

Ensure cancellation while native sendfile waits for the write buffer to drain resets the empty waiter, restores the prior reading state, and restores the selector transport registry entry.
Comment thread Lib/asyncio/proactor_events.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just move _make_empty_waiter call inside the try block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants