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-120837: Update _Py_DumpExtensionModules to be async-signal-safe by corona10 · Pull Request #121051 · python/cpython Conversation
|
| 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.
The reason will be displayed to describe this comment to others. Learn more.
Do we have to run for loop to prevent CAS failure?
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.
I think this should be a _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@colesbury PTAL :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this 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.
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
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.
There was an error while loading. Please reload this page.
| #else | ||
| return; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The #else return; doesn't do anything. I would delete it, but up to you.
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.
Done!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…afe (pythongh-121051) (cherry picked from commit 1a2e7a7) Co-authored-by: Donghee Na <[email protected]>
|
GH-121107 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.