| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…d build Use `PyDict_SetDefaultRef` to set the current task in a single operation under the dictionary's lock.
|
Still need to address leave_task and swap_current_task, but this was the easiest function to start with. The goal with this PR is thread-safety in the free-threaded build, but it also seems to slightly improve performance of enter_task. Here's a little microbenchmark I'm using: https://gist.github.com/colesbury/ece2f1a5cbc4c50f86c8634744a9badc. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Thanks @colesbury for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
…d build (pythonGH-122138) Use `PyDict_SetDefaultRef` to set the current task in a single operation under the dictionary's lock. (cherry picked from commit 47847aa) Co-authored-by: Sam Gross <colesbury@gmail.com>
|
GH-122152 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…ed build (GH-122138) (#122152) gh-120974: Make _asyncio._enter_task atomic in the free-threaded build (GH-122138) Use `PyDict_SetDefaultRef` to set the current task in a single operation under the dictionary's lock. (cherry picked from commit 47847aa) Co-authored-by: Sam Gross <colesbury@gmail.com>
…d build (python#122138) Use `PyDict_SetDefaultRef` to set the current task in a single operation under the dictionary's lock.
…d build (python#122138) Use `PyDict_SetDefaultRef` to set the current task in a single operation under the dictionary's lock.
| Back | FazBrowse Home | New Git URL |
Use PyDict_SetDefaultRef to set the current task in a single operation under the dictionary's lock.