diff --git a/src/Loop.php b/src/Loop.php index e92a719..b486d25 100644 --- a/src/Loop.php +++ b/src/Loop.php @@ -172,7 +172,7 @@ final class Loop } /** - * Execute a callback when a stream resource becomes readable. + * Execute a callback when a stream resource becomes readable or is closed for reading. * * @param resource $stream The stream to monitor. * @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute. @@ -187,7 +187,7 @@ final class Loop } /** - * Execute a callback when a stream resource becomes writable. + * Execute a callback when a stream resource becomes writable or is closed for writing. * * @param resource $stream The stream to monitor. * @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute. diff --git a/src/Loop/Driver.php b/src/Loop/Driver.php index fd2ac07..3949adf 100644 --- a/src/Loop/Driver.php +++ b/src/Loop/Driver.php @@ -78,7 +78,7 @@ abstract class Driver abstract public function repeat($interval, callable $callback, $data = null); /** - * Execute a callback when a stream resource becomes readable. + * Execute a callback when a stream resource becomes readable or is closed for reading. * * Multiple watchers on the same stream may be executed in any order. * @@ -91,7 +91,7 @@ abstract class Driver abstract public function onReadable($stream, callable $callback, $data = null); /** - * Execute a callback when a stream resource becomes writable. + * Execute a callback when a stream resource becomes writable or is closed for writing. * * Multiple watchers on the same stream may be executed in any order. *