Title: gh-114940: Add a Per-Interpreter Lock For the List of Thread States by ericsnowcurrently · Pull Request #127115 · python/cpython · GitHub
Open Graph Title: gh-114940: Add a Per-Interpreter Lock For the List of Thread States by ericsnowcurrently · Pull Request #127115 · python/cpython
X Title: gh-114940: Add a Per-Interpreter Lock For the List of Thread States by ericsnowcurrently · Pull Request #127115 · python/cpython
Description: The new lock may be used instead of the global "HEAD" lock. That global lock guards the list of interpreters, but unfortunately in some situations (like for interp->threads.head) it has been used as a generic "lock everything". This change helps us move away from that situation. Note that there are 3 places in pystate.c where we have left HEAD_LOCK()/HEAD_UNLOCK() in place: interpreter_clear() new_threadstate() tstate_delete_common() Otherwise we end up breaking a constraint on free-threaded builds. Co-authored-by: RUANG (James Roy) longjinyii@outlook.com Issue: gh-114940
Open Graph Description: The new lock may be used instead of the global "HEAD" lock. That global lock guards the list of interpreters, but unfortunately in some situations (like for interp->threads.head) it ha...
X Description: The new lock may be used instead of the global "HEAD" lock. That global lock guards the list of interpreters, but unfortunately in some situations (like for interp->threads...
Opengraph URL: https://github.com/python/cpython/pull/127115
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0d05d459-dd3c-f34f-bbb1-0423def9744d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B884:2A2344:BEA5F0:1032558:6A57E677 |
| html-safe-nonce | 77f9afc6ca57fd43fc02d9a284930bd5780d32cb37e329e3d9b555723344dbf1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODg0OjJBMjM0NDpCRUE1RjA6MTAzMjU1ODo2QTU3RTY3NyIsInZpc2l0b3JfaWQiOiIxMzAxMjQ2MDE1ODE5OTk4ODM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3dbb5eb149f99779663aff40d81ba53249e868530bf2c560d81587092bac8d10 |
| hovercard-subject-tag | pull_request:2192913069 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/127115/files |
| twitter:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1152074?s=400&v=4 |
| og:image:alt | The new lock may be used instead of the global "HEAD" lock. That global lock guards the list of interpreters, but unfortunately in some situations (like for interp->threads.head) it ha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 72a32c9d47294b6b7eb7f0250253277920c7a987 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width