| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
|
||
| #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.
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 a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
Oh, nice!
Sorry, something went wrong.
…increments (python#114568) Dictionary global version counter should use atomic increments
| Back | FazBrowse Home | New Git URL |
Dictionary global version counter should use atomic increments on free-threaded builds