Documentation for advanced stream API#110
Merged
WyriHaximus merged 5 commits intoreactphp:masterfrom Oct 14, 2017
Merged
Conversation
jsor
reviewed
Oct 13, 2017
README.md
Outdated
| register a listener to be notified when a stream is ready to write. | ||
|
|
||
| The first parameter MUST be a valid stream resource that supports | ||
| checking whether it is ready to read by this loop implementation. |
Member
There was a problem hiding this comment.
...it is ready to write by this...
Member
Author
There was a problem hiding this comment.
Thanks for spotting, fixed and amended! ![]()
jsor
approved these changes
Oct 13, 2017
This was referenced Nov 10, 2017
edusalguero
pushed a commit
to edusalguero/zmq
that referenced
this pull request
Apr 6, 2018
This was referenced Apr 9, 2018
Merged
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.
The stream API is currently mostly undocumented. This PR adds documentation for the existing stream API and then subsequently removes the unneeded and undocumented loop argument that was previously passed to stream listeners.
This is a subtle BC break. Empirical evidence (including our examples, tests and other components) suggest that most consumers will not be affected by this. The added documentation ensures that we now follow a strict API and will not introduce a BC break in the future.
Trying to create documentation for this API is not exactly trivial, as it's very low-level and has existed in this form almost since its inception. Given that most consumers SHOULD NOT use this API at all, I've marked the stream API as advanced and linked to the Stream component instead.
Performance improvement is not a major motivation here, but shows a negligible improvement anyway (running examples 92 and 94).
If you want to review, consider also looking at the individual commits.
Builds on top of #100 and #102.
Resolves / closes #87