| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| PyMutex *mutex = &obj->ob_mutex; | ||
| uint8_t expected = _Py_UNLOCKED; | ||
| // Do not wake up other threads. | ||
| _Py_atomic_compare_exchange_uint8(&mutex->_bits, &expected, _Py_UNLOCKED); |
There was a problem hiding this comment.
Do we have to run for loop to prevent CAS failure?
Sorry, something went wrong.
There was a problem hiding this comment.
I think this should be a _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED)
Sorry, something went wrong.
| PyMutex *mutex = &obj->ob_mutex; | ||
| uint8_t expected = _Py_UNLOCKED; | ||
| // Do not wake up other threads. | ||
| _Py_atomic_compare_exchange_uint8(&mutex->_bits, &expected, _Py_UNLOCKED); |
There was a problem hiding this comment.
I think this should be a _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks for fixing this!
(I left one minor comment inline. Up to you what you want to do with it.)
Sorry, something went wrong.
| #else | ||
| return; |
There was a problem hiding this comment.
The #else return; doesn't do anything. I would delete it, but up to you.
Sorry, something went wrong.
There was a problem hiding this comment.
Done!
Sorry, something went wrong.
|
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
…afe (pythongh-121051) (cherry picked from commit 1a2e7a7) Co-authored-by: Donghee Na <donghee.na@python.org>
|
GH-121107 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.