Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Observable.toList breaks with multiple subscribers#206

Merged
benjchristensen merged 2 commits intoReactiveX:masterfrom
thegeez:list-subscribe
Mar 27, 2013
Merged

Observable.toList breaks with multiple subscribers#206
benjchristensen merged 2 commits intoReactiveX:masterfrom
thegeez:list-subscribe

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.

3 participants