[php-src] PR #22872: Use `php_pollfd_for_ms` more consistently for single fd polling
| From: | NattyNarwhal | Date: | Thu, 23 Jul 2026 14:55:57 +0000 |
| Subject: | [php-src] PR #22872: Use `php_pollfd_for_ms` more consistently for single fd polling | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37250@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22872
Author: NattyNarwhal
There's a few cases where we call
poll with a single fd; we have a wrapper
(php_pollfd_for_ms) to make this case cleaner with less boilerplate.
Side note: said wrapper also uses the php_poll2 API, which can also emulate poll(2)
using select(2); FastCGI was doing this on its own, so that also handles that case. That said, poll
seems to be basically everywhere nowadays, so emulating poll is only seems useful for Windows, which
has WSAPoll. I suspect php_poll2 should be a WSAPoll wrapper
instead? The new poll API handles all this of course, but seems pretty heavyweight for the case of
just quickly polling a single fd.