{{ message }}
Add static Loop methods#229
Merged
Merged
Conversation
WyriHaximus
requested changes
Jun 29, 2021
Member
There was a problem hiding this comment.
Why are only adding streams marked as advanced? IMHO if we mark those two we should also mark removeReadStream && removeWriteStream as such. And maybe mention react/stream for easier usage.
Member
Author
There was a problem hiding this comment.
Fair point. I've applied the exact same documentation from the LoopInterface::addReadStream() method:
event-loop/src/LoopInterface.php
Line 8 in 1a709e2
Your suggestion sounds perfectly reasonable, perhaps file this as a follow-up PR to also adjust the interface and the README (similar to #110)? 👍
Member
Author
|
Rebased on |
jsor
approved these changes
Jun 30, 2021
Member
Author
WyriHaximus
approved these changes
Jun 30, 2021
This was referenced Jun 30, 2021
This was referenced Jul 8, 2021
This was referenced Jul 14, 2021
This was referenced Jul 14, 2021
This was referenced Jul 16, 2021
This was referenced Jul 22, 2021
This was referenced Aug 2, 2021
This was referenced Aug 10, 2021
This was referenced Sep 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This changeset adds static Loop methods. The Loop class now provides all methods that exist on the LoopInterface as static methods:
This is particularly useful when directly interfacing with the event loop in application code. I've also updated the documentation to highlight some use cases where the
Loop::get()method would still be useful when using dependency injection (DI).Builds on top of #226