Title: 馃挕 [REQUEST] - phasync::stream_select(array $readable=[], array $writable=[], array $except=[]) 路 Issue #44 路 phasync/phasync 路 GitHub
Open Graph Title: 馃挕 [REQUEST] - phasync::stream_select(array $readable=[], array $writable=[], array $except=[]) 路 Issue #44 路 phasync/phasync
X Title: 馃挕 [REQUEST] - phasync::stream_select(array $readable=[], array $writable=[], array $except=[]) 路 Issue #44 路 phasync/phasync
Description: Start Date No response Implementation PR No response Reference Issues No response Summary It could be nice to have an API for high performance work on streams, particularly for servers. Something like phasync::stream_select(array &$reada...
Open Graph Description: Start Date No response Implementation PR No response Reference Issues No response Summary It could be nice to have an API for high performance work on streams, particularly for servers. Something l...
X Description: Start Date No response Implementation PR No response Reference Issues No response Summary It could be nice to have an API for high performance work on streams, particularly for servers. Something l...
Opengraph URL: https://github.com/phasync/phasync/issues/44
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"馃挕 [REQUEST] - phasync::stream_select(array $readable=[], array $writable=[], array $except=[])","articleBody":"### Start Date\n\n_No response_\n\n### Implementation PR\n\n_No response_\n\n### Reference Issues\n\n_No response_\n\n### Summary\n\nIt could be nice to have an API for high performance work on streams, particularly for servers. Something like `phasync::stream_select(array \u0026$readable=[], array \u0026$writable=[], array \u0026$except=[])`. A way to select on multiple stream resources simultaneously, for example when creating a server that listens to multiple IP addresses at the same time.\n\nThe phasync::select() API can select on multiple streams - but only returns one stream resource at a time, so with 50 socket servers - there could be new connections on many socket servers.\n\n### Basic Example\n\n```php\nphasync::run(function() {\n $socketServers = []; // array of socket server\n while (true) {\n $reads = $socketServers; // copy the array, rely on COW\n $ready = phasync::stream_select(read: $reads);\n foreach ($reads as $readSocket) {\n phasync::go(function() use ($readSocket) { /* handle connection */ });\n }\n }\n});\n```\n\n### Drawbacks\n\nEven bigger API surface. Might be challenging to implement properly in the event loop driver.\n\n### Unresolved questions\n\n_No response_","author":{"url":"https://github.com/frodeborli","@type":"Person","name":"frodeborli"},"datePublished":"2026-01-07T19:01:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/44/phasync/issues/44"}
| 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:c8b59ab9-fc99-c956-96eb-bd06d729d281 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A70C:7AF86:4357259:5AF65F9:698DD95B |
| html-safe-nonce | 23ba3894e95bf506496c4cab005b4571e98bd88a3f44a0fd183405034f0e82ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzBDOjdBRjg2OjQzNTcyNTk6NUFGNjVGOTo2OThERDk1QiIsInZpc2l0b3JfaWQiOiIxNjEyNzE5OTM4OTIwNjM0NzE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4adb3e44cc73993d66bb5a0cd670ef9c59635516dd145c00845d3a1e54b9d7e9 |
| hovercard-subject-tag | issue:3789984367 |
| 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/phasync/phasync/44/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b67417063f7cbc69b6c9a017c2ce519e29692fa3fd6329355154fcc5935bf384/phasync/phasync/issues/44 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b67417063f7cbc69b6c9a017c2ce519e29692fa3fd6329355154fcc5935bf384/phasync/phasync/issues/44 |
| og:image:alt | Start Date No response Implementation PR No response Reference Issues No response Summary It could be nice to have an API for high performance work on streams, particularly for servers. Something l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | frodeborli |
| hostname | github.com |
| expected-hostname | github.com |
| None | 51102c619bffd74bf95dcf3796f0e599d197c0206d70e9e8b5c241b1b9707ee3 |
| turbo-cache-control | no-preview |
| go-import | github.com/phasync/phasync git https://github.com/phasync/phasync.git |
| octolytics-dimension-user_id | 167413172 |
| octolytics-dimension-user_login | phasync |
| octolytics-dimension-repository_id | 788340115 |
| octolytics-dimension-repository_nwo | phasync/phasync |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 788340115 |
| octolytics-dimension-repository_network_root_nwo | phasync/phasync |
| 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 | fcdeb213ace418f8a19d95dd6b93ba3337346169 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width