From 74ff6a4be158377a5e565c3a820611db2f6fe0e8 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 23 Sep 2016 16:02:23 +0200 Subject: [PATCH] Clarify that (half-)closed streams also trigger the respective read and write watchers --- src/Loop.php | 4 ++-- src/Loop/Driver.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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. *