mirror of
https://github.com/danog/amp.git
synced 2024-12-04 02:17:54 +01:00
Merge pull request #100 from async-interop/clarify_readable_writable_closed
Clarify that (half-)closed streams also trigger the respective read and write watchers
This commit is contained in:
commit
32441396c5
@ -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 resource $stream The stream to monitor.
|
||||||
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
|
* @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 resource $stream The stream to monitor.
|
||||||
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
|
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
|
||||||
|
@ -78,7 +78,7 @@ abstract class Driver
|
|||||||
abstract public function repeat($interval, callable $callback, $data = null);
|
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.
|
* 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);
|
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.
|
* Multiple watchers on the same stream may be executed in any order.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user