Skip to content
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

Consistent pipe() semantics for closed and closing streams #71

Merged
merged 4 commits into from
Mar 6, 2017

Conversation

clue
Copy link
Member

@clue clue commented Mar 5, 2017

The pipe() method previously showed some inconsistent behavior depending on which side of the pipe closed at which time (prior to piping or during piping).

The pipe() method now shows consistent behavior of calling pause() on the source side if the target is saturated or closed and now cleanly removes the event forwarding if either side is closed.

This should not affect normal usage, but some of the more hidden scenarios may in fact rely on the previous behavior. As such, I'm marking this as a BC break just to be safe.

If you want to review, also consider looking at the individual commits, this should make the changes more obvious.

Fixes / closes #36
Builds on top of #70

@clue clue added this to the v0.5.0 milestone Mar 5, 2017
README.md Outdated
destination can handle.
* `pipe(WritableStreamInterface $dest, array $options = [])`:

Pipe all the data from this readable source into the given writable $dest.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: $dest -> $dest

@clue
Copy link
Member Author

clue commented Mar 6, 2017

Updated to fix typo :shipit:

@clue clue merged commit 85bc7cd into reactphp:master Mar 6, 2017
@clue clue deleted the pipe branch March 6, 2017 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Piping from a stream that has already reached EOF
3 participants