Uh oh!
There was an error while loading. Please reload this page.
gh-111924: Use PyMutex for runtime global locks. - #112207
Conversation
This replaces some usages of PyThread_type_lock with PyMutex, which does not require memory allocation to initialize.
colesbury
commented
Nov 17, 2023
@ericsnowcurrently, when you get a chance, would you please review this?
|
ericsnowcurrently
left a comment
There was a problem hiding this comment.
mostly LGTM
I've left a few very minor comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
I've left one comment that I'll leave to your discretion. I'll wait for your response before merging.
ericsnowcurrently
commented
Dec 7, 2023
Thanks for tackling this, @colesbury! |
This replaces some usages of PyThread_type_lock with PyMutex, which does not require memory allocation to initialize. This simplifies some of the runtime initialization and is also one step towards avoiding changing the default raw memory allocator during initialize/finalization, which can be non-thread-safe in some circumstances.
This replaces some usages of PyThread_type_lock with PyMutex, which does not require memory allocation to initialize. This simplifies some of the runtime initialization and is also one step towards avoiding changing the default raw memory allocator during initialize/finalization, which can be non-thread-safe in some circumstances.
…GH-127866) This PR fixes the build issue introduced by the commit 628f6eb from GH-112207 on systems without thread local support.
…upport (pythonGH-127866) This PR fixes the build issue introduced by the commit 628f6eb from pythonGH-112207 on systems without thread local support. (cherry picked from commit f823910) Co-authored-by: velemas <10437413+velemas@users.noreply.github.com>
…upport (pythonGH-127866) This PR fixes the build issue introduced by the commit 628f6eb from pythonGH-112207 on systems without thread local support.
This replaces some usages of
PyThread_type_lockwithPyMutex, which does not require memory allocation to initialize.This simplifies some of the runtime initialization and is also one step towards avoiding changing the default raw memory allocator during initialize/finalization, which can be non-thread-safe in some circumstances.