You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worth exploring if it is possible to prevent duplicate onStart without wrapping Subscriber. It may not be worth the effort for the small benefit, but it seems wrong we need to wrap just to avoid that.
One possible solution is that only subscribe() calls onStart automatically, but neither unsafeSubscribe nor lift does it and operators that 'repurpose' their incoming Subscriber have to decide whether it is safe to call onStart or not. I think RxJava 2.0 with the Reactive-Streams API can really resolve this issue for good.
A possible technical solution is to make sources (range, from, Subject) call onStart manually instead of the Observable.subscribe doing it but then all operators' parent Subscriber has to be updated to call onStart on its child subscriber. The problem is, that's a protocol change and existing custom operators outside RxJava won't know to do it and require updates as well.
I don't think this can be solved with 1.x architecture without drastically affecting everything.
Worth exploring if it is possible to prevent duplicate
onStart
without wrappingSubscriber
. It may not be worth the effort for the small benefit, but it seems wrong we need to wrap just to avoid that.The duplication comes via
lift
here:RxJava/src/main/java/rx/Observable.java
Line 144 in bd8fb30
Examples of wrapping were discussed originally here: #3065 (comment)
The text was updated successfully, but these errors were encountered: