gh-120974: Make asyncio `swap_current_task` safe in free-threaded build by colesbury · Pull Request #122317 · python/cpython · GitHub
Skip to content

gh-120974: Make asyncio swap_current_task safe in free-threaded build - #122317

Merged
kumaraditya303 merged 2 commits into
python:mainfrom
colesbury:gh-120974-asyncio-swap-current-task
Aug 2, 2024
Merged

kumaraditya303 merged 2 commits into
python:mainfrom
colesbury:gh-120974-asyncio-swap-current-task

Conversation

@colesbury

@colesbury colesbury commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

Use a critical section around the modifications to current_tasks so that the swapping is atomic.

…ed build

Use a critical section around the modifications to `current_tasks`.
@colesbury

Copy link
Copy Markdown
Contributor Author

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @colesbury for commit 846f6f8 🤖

The command will test the builders whose names match following regular expression: nogil refleaks

The builders matched are:

  • AMD64 Fedora Rawhide NoGIL refleaks PR
  • PPC64LE Fedora Rawhide NoGIL refleaks PR
  • aarch64 Fedora Rawhide NoGIL refleaks PR
  • AMD64 Ubuntu NoGIL Refleaks PR

Comment thread Modules/_asynciomodule.c Outdated
@colesbury
colesbury requested a review from kumaraditya303 July 29, 2024 16:52
@kumaraditya303
kumaraditya303 merged commit b5e6fb3 into python:main Aug 2, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @colesbury for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 2, 2024
…ed build (pythonGH-122317)

* pythongh-120974: Make asyncio `swap_current_task` safe in free-threaded build
(cherry picked from commit b5e6fb3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app

bedevere-app Bot commented Aug 2, 2024

Copy link
Copy Markdown

GH-122612 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 2, 2024
kumaraditya303 pushed a commit that referenced this pull request Aug 2, 2024
…ded build (GH-122317) (#122612)

gh-120974: Make asyncio `swap_current_task` safe in free-threaded build (GH-122317)

* gh-120974: Make asyncio `swap_current_task` safe in free-threaded build
(cherry picked from commit b5e6fb3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

brandtbucher pushed a commit to brandtbucher/cpython that referenced this pull request Aug 7, 2024
…ed build (python#122317)

* pythongh-120974: Make asyncio `swap_current_task` safe in free-threaded build
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…ed build (python#122317)

* pythongh-120974: Make asyncio `swap_current_task` safe in free-threaded build
@colesbury
colesbury deleted the gh-120974-asyncio-swap-current-task branch October 30, 2024 16:43
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.

3 participants