Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make weakref thread-safe without the GIL #111926

Copy link
Copy link
@colesbury

Description

@colesbury
Issue body actions

Feature or enhancement

The current weakref implementation relies on the GIL for thread-safety.

The nogil-3.12 fork substantially modifies the weakref implementation. I think we can implement a simpler change in CPython 3.13 (main) now that all PyObject's have their own mutex (in --disable-gil builds).

Basic idea

Protect access to the weakrefs linked list using the mutex in the weakly referenced object. Use the critical section API.

Prior implementation: colesbury/nogil-3.12@0dddcb6f9d

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.