Skip to content

gh-112070: make functools.lru_cache threadsafe in --disable-gil build - #112111

Merged
corona10 merged 5 commits into
python:mainfrom
wanderxjtu:gh-112070-lrucache-nogil
Nov 17, 2023
Merged

gh-112070: make functools.lru_cache threadsafe in --disable-gil build#112111
corona10 merged 5 commits into
python:mainfrom
wanderxjtu:gh-112070-lrucache-nogil

Conversation

@wanderxjtu

@wanderxjtuwanderxjtu commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

@ghost

ghost commented Nov 15, 2023

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@AlexWaygoodAlexWaygood changed the title gh-112070: make functools.lrucacle threadsafe in --disable-gil buildgh-112070: make functools.lru_cache threadsafe in --disable-gil buildNov 15, 2023
@wanderxjtu
wanderxjtuforce-pushed the gh-112070-lrucache-nogil branch from cb84c37 to f243dbdCompareNovember 15, 2023 12:11
@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@colesburycolesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wanderxjtu! I left a few comments inline. I don't think this change needs a NEWS entry, so I added the "skip news" label and removed the NEWS file.

Comment threadModules/_functoolsmodule.c Outdated
Comment threadModules/_functoolsmodule.c Outdated

@colesburycolesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wanderxjtu!

@corona10, would you please review this PR?

@corona10

Copy link
Copy Markdown
Member

I will take a look

@corona10corona10 self-assigned this Nov 16, 2023

@corona10corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@corona10
corona10 merged commit 0ee2d77 into python:mainNov 17, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request 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 pull request 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make functools.lru_cache thread-safe in --disable-gil builds

3 participants

@wanderxjtu@corona10@colesbury