-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Source for ShareReplay accidentally re-introduced? #710
Comments
Good catch. I'll remove it. |
Remove two operators that were reintroduced by mistake. shareReplay and shareBehavior should not exist anymore. Resolves issue ReactiveX#710.
I think this can be closed now. Please freely reopen if there's necessary task remains. |
Why were this members removed. How to i get the same behaviour with auto connect. I don't have to have to call connect every time I make a subscription because I don't know my callers |
@sbabeal you can achieve the same behavior by calling |
Let me give it a try. When I moved over to publishReplay(), the code running under the subscription never gets called. const connectionObservable = rx.Observable.create((observer: rx.Observer) => { So when I call connectionObservable.subscribe( x => ….) the code in yellow never gets run. If I remove publishReplay(1). Then it works as expected. My issue is that the next subscriber doesn’t get the SignalRConnection since its was already published. I’ll write back in a second to let you know if it worked. -Brandt From: Paul Taylor [mailto:notifications@github.com] @sbabealhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sbabeal&d=CwMCaQ&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=Mo1qRXShQ_F6v4wFHj1oKQ&m=2dZayngCjjejIGVa2ePfrPr4GtyHbBxx-YPnq9RmsCM&s=DiqmwkTZljba3kMLC5xFRoMswAwuveXdwXPkuM2p-eY&e= you can achieve the same behavior by calling source.publishReplay().refCount(). The share operators were removed to highlight the fact that the old share operator behaviors don't support retrying or repeating. — |
Dude you’re awesome!!! Works perfectly. Thanks -Brandt From: Paul Taylor [mailto:notifications@github.com] @sbabealhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sbabeal&d=CwMCaQ&c=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw&r=Mo1qRXShQ_F6v4wFHj1oKQ&m=2dZayngCjjejIGVa2ePfrPr4GtyHbBxx-YPnq9RmsCM&s=DiqmwkTZljba3kMLC5xFRoMswAwuveXdwXPkuM2p-eY&e= you can achieve the same behavior by calling source.publishReplay().refCount(). The share operators were removed to highlight the fact that the old share operator behaviors don't support retrying or repeating. — |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I just noticed that the source for shareReplay still exists in src/operators/shareReplay.ts. This was supposed to be removed in d0adf57, wasn't it? e196657 seems to re-introduce it. Maybe a merge gone wrong there?
The text was updated successfully, but these errors were encountered: