gh-112075: Add gc shared bits by DinoV · Pull Request #114931 · python/cpython · GitHub
Skip to content

gh-112075: Add gc shared bits - #114931

Merged
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_gc_shared
Feb 5, 2024
Merged

gh-112075: Add gc shared bits#114931
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_gc_shared

Conversation

@DinoV

@DinoV DinoV commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

This adds the GC shared flags for objects to the gc bit states in free-threaded builds. This will allow marking objects as being shared so that we can use QSBR to free them, enabling lock-free readers for dict (and other) objects.

Comment thread Include/internal/pycore_gc.h
Comment thread Include/internal/pycore_gc.h Outdated
@DinoV
DinoV force-pushed the nogil_dict_gc_shared branch from 8f1cc87 to 1d72215 Compare February 3, 2024 01:09

@colesbury colesbury 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.

LGTM!

@DinoV
DinoV force-pushed the nogil_dict_gc_shared branch from 1d72215 to 582179c Compare February 5, 2024 17:47
@DinoV
DinoV merged commit bcccf1f into python:main Feb 5, 2024
@bedevere-bot

Copy link
Copy Markdown

@vstinner

vstinner commented Feb 7, 2024

Copy link
Copy Markdown
Member

fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
Add GC shared flags for objects to the GC bit states in free-threaded builds
@DinoV
DinoV deleted the nogil_dict_gc_shared branch May 31, 2024 18:23
Sign up for free to 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.

4 participants