-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threading.local()
access should scale well from multiple threads
#128691
Labels
performance
Performance or resource usage
topic-free-threading
type-feature
A feature request or enhancement
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jan 9, 2025
After this change, the "thread_local_read" micro benchmark in Tools/ftscalingbench/ftscalingbench.py now scales well when multiple threads read from the same thread-local variable.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jan 9, 2025
After this change, the "thread_local_read" micro benchmark in Tools/ftscalingbench/ftscalingbench.py now scales well when multiple threads read from the same thread-local variable.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jan 9, 2025
This change, along with the LOAD_ATTR specializations, makes the "thread_local_read" micro benchmark in Tools/ftscalingbench/ftscalingbench.py scale well to multiple threads.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jan 10, 2025
colesbury
changed the title
Jan 10, 2025
threading.local()
access should scale wellthreading.local()
access should scale well from multiple threads
colesbury
added a commit
that referenced
this issue
Jan 10, 2025
This change, along with the LOAD_ATTR specializations, makes the "thread_local_read" micro benchmark in Tools/ftscalingbench/ftscalingbench.py scale well to multiple threads.
hugovk
added a commit
to hugovk/cpython
that referenced
this issue
Jan 12, 2025
…_local` (python#128693)" This reverts commit c141748.
hugovk
added a commit
to hugovk/cpython
that referenced
this issue
Jan 12, 2025
…_local` (python#128693)" This reverts commit c141748.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
performance
Performance or resource usage
topic-free-threading
type-feature
A feature request or enhancement
Currently, accessing a
threading.local()
from multiple threads doesn't scale well because of reference count contention on the shared_thread._local
object. We should use deferred reference counting on_thread._local
to avoid this bottleneck.Linked PRs
_thread._local
#128693_thread._local
(#128693)" #128753The text was updated successfully, but these errors were encountered: