Skip to content
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

Make sys.settrace, sys.setprofile, and sys.monitoring thread safe in --disable-gil builds #116818

Closed
Tracked by #108219
DinoV opened this issue Mar 14, 2024 · 1 comment
Closed
Tracked by #108219
Assignees
Labels
topic-free-threading type-feature A feature request or enhancement

Comments

@DinoV
Copy link
Contributor

DinoV commented Mar 14, 2024

Feature or enhancement

Proposal:

These need to work properly when called with multiple threads running.

colesbury/nogil-3.12@82800d8ec8

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

#108219

Linked PRs

@DinoV DinoV added type-feature A feature request or enhancement topic-free-threading labels Mar 14, 2024
@DinoV DinoV self-assigned this Mar 14, 2024
DinoV added a commit that referenced this issue Apr 19, 2024
…ad-safe (#116775)

Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe.

Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version.  There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
@colesbury
Copy link
Contributor

I think this is done

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