Skip to content

Streams Poll API#19572

Open
bukka wants to merge 2 commits intophp:masterfrom
bukka:poll_api
Open

Streams Poll API#19572
bukka wants to merge 2 commits intophp:masterfrom
bukka:poll_api

Conversation

@bukka
Copy link
Copy Markdown
Member

@bukka bukka commented Aug 24, 2025

This introduces a new API for polling that supports various backends:

  • epoll for Linux
  • kqueue for MacOS and BSD variants
  • WSAPoll for Windows
  • Event ports for Solaris and Illumos
  • poll for the rest

The API tries to reflect primarily epoll and the rest is done in a way so it is compatible.

RFC: https://wiki.php.net/rfc/poll_api

@bukka
Copy link
Copy Markdown
Member Author

bukka commented Aug 24, 2025

Currently just kqueue and poll on MacOS are properly tested. The epoll should be easy to get tested but will need to then properly look to iocp and event ports. For event ports I will need to first set OmniOS (Illumos) up.

@bukka
Copy link
Copy Markdown
Member Author

bukka commented Aug 24, 2025

So epoll looks good and all tests passing there.

Tha API also builds on Windows but unsuprisingly the iocp backend does not really work well so this is someting that I will be looking to.

And then event ports will likely need some work as well which I will look then too.

@bukka bukka force-pushed the poll_api branch 3 times, most recently from 2d53464 to 4edefc1 Compare September 24, 2025 20:28
@bukka bukka force-pushed the poll_api branch 2 times, most recently from e2f2ec8 to 22689ad Compare October 30, 2025 20:55
@bukka bukka marked this pull request as ready for review October 30, 2025 20:55
@bukka bukka force-pushed the poll_api branch 2 times, most recently from a68b8be to 1d55dce Compare December 24, 2025 00:18
@bukka bukka force-pushed the poll_api branch 2 times, most recently from a74b2b8 to d48b64f Compare February 22, 2026 15:43
@bukka bukka force-pushed the poll_api branch 2 times, most recently from 9c3c346 to 1378608 Compare March 15, 2026 16:17
bukka added 2 commits April 25, 2026 21:10
This introduces various IO polling backend including epoll, kqueue,
event ports, poll and WSAPoll. It makes the usage compatible between
backends.
It makes use of internal polling API and exposes its functionality to
user space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant