You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyDict_Next currently wraps _PyDict_Next in a critical section. We shouldn't do this -- the locking needs to be external to the call.
It's not sufficient to lock the dict just for each _PyDict_Next call because we return borrowed references and because pos becomes meaningless if the dictionary gets resized or rehashed.
It interferes with externally locking the dict because the inner critical sections can suspend the outer ones. In other words, if the caller use a critical section to lock the dict for multiple iterations, this will break that.
Activity
[-]`PyDict_Next` should include begin a critical section[/-][+]`PyDict_Next` should not begin a critical section[/+][-]`PyDict_Next` should not begin a critical section[/-][+]`PyDict_Next` should not lock the dict[/+]pythongh-120858: PyDict_Next should not lock the dict
gh-120858: PyDict_Next should not lock the dict (#120859)
pythongh-120858: PyDict_Next should not lock the dict (pythonGH-120859)
[3.13] gh-120858: PyDict_Next should not lock the dict (GH-120859) (#…
pythongh-120858: PyDict_Next should not lock the dict (python#120859)
pythongh-120858: PyDict_Next should not lock the dict (python#120859)
pythongh-120858: PyDict_Next should not lock the dict (python#120859)