[php-src] PR #24017: Report Io\Poll level watchers with buffered stream data

From: Date: Wed, 30 Sep 2026 13:33:55 +0000
Subject: [php-src] PR #24017: Report Io\Poll level watchers with buffered stream data
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38988@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24017 Author: bukka A stream can hold unread data in its buffer while its descriptor is idle. stream_select() treats such a stream as readable but a level watcher looked at the descriptor only, so a loop waiting for readability never woke up (GH-23948). Context::wait() now checks level watchers with Read interest for buffered data first and reports them with Read triggered. The backend is then asked without waiting so descriptor events are merged in and a watcher readable both ways is returned once. Edge watchers are not affected. A one-shot reported from its buffer is disarmed like one fired by the backend and modifyEvents() re-arms it. The check reads the stream buffer positions only and does no IO. The check is a handle operation so other handle types can provide it. It is registered separately as php_poll_handle_ext_ops because the handle ops struct cannot grow without an ABI change. This is temporary and the operation moves to the ops struct in master.

« previous php.git-pulls (#38988) next »