-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Make functools.lru_cache
thread-safe in --disable-gil
builds
#112070
Labels
3.13
bugs and security fixes
extension-modules
C modules in the Modules dir
topic-free-threading
type-feature
A feature request or enhancement
Comments
colesbury
added
type-feature
A feature request or enhancement
3.13
bugs and security fixes
topic-free-threading
labels
Nov 14, 2023
I will try on it. |
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 15, 2023
wanderxjtu
added a commit
to wanderxjtu/cpython
that referenced
this issue
Nov 16, 2023
corona10
pushed a commit
that referenced
this issue
Nov 17, 2023
…ld (gh-112111) * gh-112070: make `functools.lrucacle` threadsafe in --disable-gil build * gh-112070: update generate `functoolsmodule` files * gh-112070: add NEWS file * Delete Misc/NEWS.d/next/Library/2023-11-15-20-19-45.gh-issue-112070.q6OhcU.rst * gh-112070: reformat functoolsmodule.c --------- Co-authored-by: Sam Gross <colesbury@gmail.com>
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…il build (pythongh-112111) * pythongh-112070: make `functools.lrucacle` threadsafe in --disable-gil build * pythongh-112070: update generate `functoolsmodule` files * pythongh-112070: add NEWS file * Delete Misc/NEWS.d/next/Library/2023-11-15-20-19-45.gh-issue-112070.q6OhcU.rst * pythongh-112070: reformat functoolsmodule.c --------- Co-authored-by: Sam Gross <colesbury@gmail.com>
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
…il build (pythongh-112111) * pythongh-112070: make `functools.lrucacle` threadsafe in --disable-gil build * pythongh-112070: update generate `functoolsmodule` files * pythongh-112070: add NEWS file * Delete Misc/NEWS.d/next/Library/2023-11-15-20-19-45.gh-issue-112070.q6OhcU.rst * pythongh-112070: reformat functoolsmodule.c --------- Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
bugs and security fixes
extension-modules
C modules in the Modules dir
topic-free-threading
type-feature
A feature request or enhancement
Feature or enhancement
We should make
functools.lru_cache
thread-safe in the--disable-gil
builds.For context, here is the commit from the
nogil-3.12
fork: colesbury/nogil-3.12@041a08e339NOTES (differences in 3.13 from
nogil-3.12
):lru_cache_object
; every PyObject has a mutex in the--disable-gil
builds_functools__lru_cache_wrapper_cache_info_impl
and_functools__lru_cache_wrapper_cache_clear_impl
we should instead use the@critical_section
Arugment Clinic directive. This will be simpler and require fewer changes to the code.lru_cache_call
still needs explicit calls to the critical section API.Linked PRs
functools.lru_cache
threadsafe in --disable-gil build #112111The text was updated successfully, but these errors were encountered: