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

Add backpressure support for StringObservable.from(InputStream) #9

Closed
wants to merge 2 commits into from

Conversation

davidmoten
Copy link
Contributor

backpressure support added for StringObservable.from(InputStream) including a few unit tests.

Once this PR makes it through can add a similar one for StringObservable.from(Reader).


//check if we have finished
if (numRead == -1 && !subscriber.isUnsubscribed())
subscriber.onCompleted();
Copy link
Member

Choose a reason for hiding this comment

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

A return is missing here; without it, the while loop would spin until the downstream actually unsubscribes.

@akarnokd
Copy link
Member

I'd like to hold on this PR until RxJava gets to 1.0.5.

@davidmoten
Copy link
Contributor Author

Thanks for feedback @akarnokd. The creation of this actually predates your AbstractOnSubscribe making it to release so I'll drop this PR and submit another much simpler version using AbstractOnSubscribe. I also have backpressure support ready for the split operator. I'll get it all ready and submit soonish (in separate PRs).

@davidmoten
Copy link
Contributor Author

PR for this ready to go. Just waiting on rxjava 1.0.9 release with AbstractOnSubscribe fix before submitting.

@davidmoten davidmoten closed this Apr 10, 2015
@davidmoten
Copy link
Contributor Author

superseded by #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants