GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-112075: Dictionary global version counter should use atomic increments by DinoV · Pull Request #114568 · python/cpython Conversation
|
|
|
||
| #ifdef Py_GIL_DISABLED | ||
| #define DICT_NEXT_VERSION(INTERP) \ | ||
| (_Py_atomic_add_uint64(&(INTERP)->dict_state.global_version, DICT_VERSION_INCREMENT) + DICT_VERSION_INCREMENT) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine for now, especially in the interest of getting to the point where we can run the test suite with the GIL disabled, but we will want to avoid contention on the global version counter.
The strategy in nogil and nogil-3.12 was to reserve something like the next 256 versions (atomically) and then serve the next version requests from thread-local state.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…increments (python#114568) Dictionary global version counter should use atomic increments
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.