Skip to content

We shouldn't lock to clear an object #130313

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

Closed
DinoV opened this issue Feb 19, 2025 · 0 comments
Closed

We shouldn't lock to clear an object #130313

DinoV opened this issue Feb 19, 2025 · 0 comments
Labels
topic-free-threading type-feature A feature request or enhancement

Comments

@DinoV
Copy link
Contributor

DinoV commented Feb 19, 2025

Feature or enhancement

Proposal:

Currently we lock to clear the attributes of an object because we just re-use setting a managed dict to NULL. But if we haven't created a managed dictionary then there's no need to lock the object, it's no longer referenced externally.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@DinoV DinoV added the type-feature A feature request or enhancement label Feb 19, 2025
DinoV added a commit that referenced this issue Feb 20, 2025
Avoid locking when clearing objects in the free-threaded build
@DinoV DinoV closed this as completed Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-free-threading type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants