Title: Move the `eval_breaker` to `PyThreadState` · Issue #112175 · python/cpython · GitHub
Open Graph Title: Move the `eval_breaker` to `PyThreadState` · Issue #112175 · python/cpython
X Title: Move the `eval_breaker` to `PyThreadState` · Issue #112175 · python/cpython
Description: Feature or enhancement The eval_breaker is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exceptions. It is currently in the interpret...
Open Graph Description: Feature or enhancement The eval_breaker is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exce...
X Description: Feature or enhancement The eval_breaker is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exce...
Opengraph URL: https://github.com/python/cpython/issues/112175
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move the `eval_breaker` to `PyThreadState`","articleBody":"# Feature or enhancement\n\nThe `eval_breaker` is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exceptions. It is currently in the interpreter state (in `interp-\u003eceval.eval_breaker`). However, some of the events are specific to a given thread. For example, signals and some pending calls can only be executed on the \"main\" thread of an interpreter. \n\nWe should move the `eval_breaker` to `PyThreadState` to better handle these thread-specific events. This is more important for the `--disable-gil` builds where multiple threads within the same interpreter may be running at the same time.\n\n@markshannon suggested a combination of per-interpreter and per-thread state, where the thread copies the per-interpreter eval_breaker state to the per-thread state when it acquires the GIL.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-115194\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2023-11-16T18:16:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/112175/cpython/issues/112175"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0a6f9c59-d9f2-a5f0-434c-aca8562f2121 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D214:1348C2:F0B4A7:14AB734:6969F1BB |
| html-safe-nonce | 3bfc9862eaf9e3812d3f22d3b823f23aba7f44dccef952b8e2e85ef34abde87a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjE0OjEzNDhDMjpGMEI0QTc6MTRBQjczNDo2OTY5RjFCQiIsInZpc2l0b3JfaWQiOiI3Mzg5MjY4MjIyNjU0NjczMzM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cd3a2b4d96f15de696803793e95f74fd09c073a2d024f5ab8e18f373cd70daa5 |
| hovercard-subject-tag | issue:1997472630 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/112175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55ca5682ef09241e5735feefa77ef4afb5a9c6f176096f7e6e29387457fa4f37/python/cpython/issues/112175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55ca5682ef09241e5735feefa77ef4afb5a9c6f176096f7e6e29387457fa4f37/python/cpython/issues/112175 |
| og:image:alt | Feature or enhancement The eval_breaker is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exce... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | colesbury |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width