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

Observable.toList breaks with multiple subscribers #206

Merged
merged 2 commits into from
Mar 27, 2013

Conversation

thegeez
Copy link
Contributor

@thegeez thegeez commented Mar 24, 2013

(let [i1 (Subject/create)
        out (Observable/toList i1)]
    (.subscribe out (partial prn "first observer"))
    (.subscribe out (partial prn "second observer"))
    (.subscribe out (partial prn "third observer"))
    (.onNext i1 1)
    (.onNext i1 2)
    (.onNext i1 3)
    (.onNext i1 4)
    (.onNext i1 5)
    (.onNext i1 6)
    (.onCompleted i1))

Output:

"first observer" [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6]
"second observer" [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6]
"third observer" [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6]

Should be:

"first observer" [1 2 3 4 5 6]
"second observer" [1 2 3 4 5 6]
"third observer" [1 2 3 4 5 6]

@cloudbees-pull-request-builder

RxJava-pull-requests #48 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

Good change ... that was a silly mistake on my part, sorry about that and thank you for submitting a fix.

benjchristensen added a commit that referenced this pull request Mar 27, 2013
Observable.toList breaks with multiple subscribers
@benjchristensen benjchristensen merged commit 2df0bea into ReactiveX:master Mar 27, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Observable.toList breaks with multiple subscribers
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
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.

None yet

3 participants