Skip to content

GH-116946: Eliminate the need for the GC in the _thread.lock and _thread.RLock - #141268

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
sergey-miryanov:116946-remove-gc-from-thread-lock
Nov 12, 2025
Merged

kumaraditya303 merged 1 commit into
python:mainfrom
sergey-miryanov:116946-remove-gc-from-thread-lock

Conversation

@sergey-miryanov

@sergey-miryanov sergey-miryanov commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

From #116946 (comment):

There are a number of heap types which are currently unnecessary gc types like _thread.lock, it would be nice to remove that as it would reduce memory usage and reduce pressure on gc, in case anyone wants to work on it.

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

@kumaraditya303 Could you please take a look?

@kumaraditya303
kumaraditya303 merged commit fbebca2 into python:main Nov 12, 2025
@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

Thanks!

kumaraditya303 added a commit to kumaraditya303/cpython that referenced this pull request Nov 12, 2025
kumaraditya303 added a commit that referenced this pull request Nov 12, 2025
… and `_thread.RLock` (#141448)

Revert "GH-116946: eliminate the need for the GC in the `_thread.lock` and `_thread.RLock` (#141268)"

This reverts commit fbebca2.
@efimov-mikhail efimov-mikhail added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 12, 2025
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @efimov-mikhail for commit fb0dc6f 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F141268%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 12, 2025
@efimov-mikhail

efimov-mikhail commented Nov 12, 2025 •

Copy link
Copy Markdown
Member

Oh, it seems that 🔨 test-with-buildbots label can't make something useful after PR have been merged.
Probably, that's okay.

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
….lock` and `_thread.RLock` (python#141448)

Revert "pythonGH-116946: eliminate the need for the GC in the `_thread.lock` and `_thread.RLock` (python#141268)"

This reverts commit fbebca2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants