FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-114940: Add _Py_FOR_EACH_TSTATE_UNLOCKED(), and Friends by ericsnowcurrently · Pull Request #127077 · python/cpython · GitHub

/ cpython Public

gh-114940: Add _Py_FOR_EACH_TSTATE_UNLOCKED(), and Friends - #127077

Merged
ericsnowcurrently merged 4 commits into
python:mainfrom
ericsnowcurrently:fix-tstates-iteration
Nov 21, 2024
Merged

gh-114940: Add _Py_FOR_EACH_TSTATE_UNLOCKED(), and Friends#127077
ericsnowcurrently merged 4 commits into
python:mainfrom
ericsnowcurrently:fix-tstates-iteration

Conversation

ericsnowcurrently commented Nov 20, 2024
edited
Loading

Copy link
Copy Markdown
Member

This is a precursor to the actual fix for gh-114940, where we will change these macros to use the new lock. This change is almost entirely mechanical; the exceptions are the loops in codeobject.c and ceval.c, which now hold the "head" lock. Note that almost all of the uses of _Py_FOR_EACH_TSTATE_UNLOCKED() here will change to _Py_FOR_EACH_TSTATE_BEGIN() once we add the new per-interpreter lock.

Copy link
Copy Markdown
Member Author

@colesbury, do you have any objections to how I turn _Py_FOR_EACH_THREAD() into _Py_FOR_EACH_STW_INTERP() in pystate.c? Again, it's a fairly mechanical change, but it will allow us to more easily switch to the per-interpreter lock in a follow-up PR.

Copy link
Copy Markdown
Contributor

No objections from me!

ericsnowcurrently merged commit 9dabace into python:main Nov 21, 2024
ericsnowcurrently deleted the fix-tstates-iteration branch November 21, 2024 18:08
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…hongh-127077)

This is a precursor to the actual fix for pythongh-114940, where we will change these macros to use the new lock.  This change is almost entirely mechanical; the exceptions are the loops in codeobject.c and ceval.c, which now hold the "head" lock.  Note that almost all of the uses of _Py_FOR_EACH_TSTATE_UNLOCKED() here will change to _Py_FOR_EACH_TSTATE_BEGIN() once we add the new per-interpreter lock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL