gh-112175: Add `eval_breaker` to `PyThreadState` (#115194)
This change adds an `eval_breaker` field to `PyThreadState`. The primary motivation is for performance in free-threaded builds: with thread-local eval breakers, we can stop a specific thread (e.g., for an async exception) without interrupting other threads. The source of truth for the global instrumentation version is stored in the `instrumentation_version` field in PyInterpreterState. Threads usually read the version from their local `eval_breaker`, where it continues to be colocated with the eval breaker bits.
B
Brett Simmers committed
0749244d13412d7cb5b53d834f586f2198f5b9a6
Parent: e71468b
Committed by GitHub <noreply@github.com>
on 2/20/2024, 2:57:48 PM