Skip to content

Commit 3244139

Browse files
authored
Merge pull request #100 from async-interop/clarify_readable_writable_closed
Clarify that (half-)closed streams also trigger the respective read and write watchers
2 parents 3791a75 + 74ff6a4 commit 3244139

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Loop.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public static function repeat($interval, callable $callback, $data = null)
172172
}
173173

174174
/**
175-
* Execute a callback when a stream resource becomes readable.
175+
* Execute a callback when a stream resource becomes readable or is closed for reading.
176176
*
177177
* @param resource $stream The stream to monitor.
178178
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
@@ -187,7 +187,7 @@ public static function onReadable($stream, callable $callback, $data = null)
187187
}
188188

189189
/**
190-
* Execute a callback when a stream resource becomes writable.
190+
* Execute a callback when a stream resource becomes writable or is closed for writing.
191191
*
192192
* @param resource $stream The stream to monitor.
193193
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.

src/Loop/Driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ abstract public function delay($delay, callable $callback, $data = null);
7878
abstract public function repeat($interval, callable $callback, $data = null);
7979

8080
/**
81-
* Execute a callback when a stream resource becomes readable.
81+
* Execute a callback when a stream resource becomes readable or is closed for reading.
8282
*
8383
* Multiple watchers on the same stream may be executed in any order.
8484
*
@@ -91,7 +91,7 @@ abstract public function repeat($interval, callable $callback, $data = null);
9191
abstract public function onReadable($stream, callable $callback, $data = null);
9292

9393
/**
94-
* Execute a callback when a stream resource becomes writable.
94+
* Execute a callback when a stream resource becomes writable or is closed for writing.
9595
*
9696
* Multiple watchers on the same stream may be executed in any order.
9797
*

0 commit comments

Comments
 (0)