-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Documentation for advanced stream API #110
Conversation
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. |
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.
...it is ready to write by this...
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.
Thanks for spotting, fixed and amended!
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.
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