Title: Adding selectors has two KeyError exceptions in the success path · Issue #106664 · python/cpython · GitHub
Open Graph Title: Adding selectors has two KeyError exceptions in the success path · Issue #106664 · python/cpython
X Title: Adding selectors has two KeyError exceptions in the success path · Issue #106664 · python/cpython
Description: Similar to #106527, adding a new asyncio reader has to hit _SelectorMapping.__getitem__ which is expected to raise and catch KeyError twice since the reader will not yet be in the map. When connections are constantly being added and remo...
Open Graph Description: Similar to #106527, adding a new asyncio reader has to hit _SelectorMapping.__getitem__ which is expected to raise and catch KeyError twice since the reader will not yet be in the map. When connect...
X Description: Similar to #106527, adding a new asyncio reader has to hit _SelectorMapping.__getitem__ which is expected to raise and catch KeyError twice since the reader will not yet be in the map. When connect...
Opengraph URL: https://github.com/python/cpython/issues/106664
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Adding selectors has two KeyError exceptions in the success path","articleBody":"Similar to https://github.com/python/cpython/issues/106527, adding a new asyncio reader has to hit `_SelectorMapping.__getitem__` which is expected to raise and catch KeyError twice since the reader will not yet be in the map.\r\n\r\nWhen connections are constantly being added and removed because devices are being polled over http/websocket the overhead of adding/removing readers adds up.\r\n\r\nFor a webserver with connections constantly being added/removed, the cost of adding and removing impacts how many clients can be handled\r\n\r\nAnother place I see this come up is with dbus connections which need to get torn down and created at fast clip when dealing with bluetooth devices.\r\n\r\nSee https://github.com/python/cpython/issues/106527#issuecomment-1627468269 and https://github.com/python/cpython/issues/106527#issuecomment-1625923919 for where this was split from\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-106665\r\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/bdraco","@type":"Person","name":"bdraco"},"datePublished":"2023-07-12T03:02:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/106664/cpython/issues/106664"}
| 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:1a75c5f0-167b-365f-f8b7-d5dd0695232f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A208:120AD1:50A79:68569:696B5A7B |
| html-safe-nonce | 611aaa1bca961108f4f8bdccee8b8743412102e93879df4a85239f29f14d1315 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjA4OjEyMEFEMTo1MEE3OTo2ODU2OTo2OTZCNUE3QiIsInZpc2l0b3JfaWQiOiIzNzE5NDY4NjMxMDI0NDI1NTk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8dae04f55792c38da8c3c49c80ecdb50dd3191c7b0bccd43fbb38766fbcfa75e |
| hovercard-subject-tag | issue:1800078395 |
| 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/106664/issue_layout |
| twitter:image | https://opengraph.githubassets.com/509d480e447392c82e97e787159df04b59bc89ea7c599d632246434b35145cac/python/cpython/issues/106664 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/509d480e447392c82e97e787159df04b59bc89ea7c599d632246434b35145cac/python/cpython/issues/106664 |
| og:image:alt | Similar to #106527, adding a new asyncio reader has to hit _SelectorMapping.__getitem__ which is expected to raise and catch KeyError twice since the reader will not yet be in the map. When connect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bdraco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width