-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Asio] Introduce Async I/O component #161
Conversation
54cf6f4
to
345197d
Compare
|
||
final class TimeoutException extends Exception\RuntimeException implements ExceptionInterface | ||
{ | ||
public function __construct(string $message = 'operation timed out.', int $code = 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the exception expose how long it took?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably, will see ( this PR is not getting merged until PHP 8.1 is released, so there's still time to change the API 😛 )
src/Psl/Asio/stub.php
Outdated
if (false) { | ||
final class Fiber | ||
{ | ||
public function __construct(callable $c) | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove stub before merge
8b308c5
to
c5cc9f4
Compare
* | ||
* @internal | ||
*/ | ||
public function onJoin(callable $callable): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this method name come from?
In amp, they use on resolve, which is more clear IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method ( maybe the whole class? ) is going to be removed soon thanks to some clever work by @:trowski and @:kelunik.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Is it a loop / promise rfc to php-src perhaps? ;)
No description provided.