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

refactor(operator): operators should call source.subscribe #1570

Closed

Conversation

trxcllnt
Copy link
Member

Description:
Passing the source into the operator lets the operator determine when the source subscription occurs (if at all). This will allow us to fix subscription ordering bugs like #1360.

Related issue (if exists):
#1360 is the only one that's filed as far as I know, but there are most likely others (finally comes to mind).

cc: @Blesh

@@ -1,7 +1,7 @@
import {Subscriber} from './Subscriber';

export class Operator<T, R> {
call(subscriber: Subscriber<R>): Subscriber<T> {
return new Subscriber<T>(subscriber);
call(subscriber: Subscriber<R>, source: any): any {
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to limit type of source instead of any?

@benlesh
Copy link
Member

benlesh commented Apr 1, 2016

Looks like what we discussed. LGTM.

@benlesh
Copy link
Member

benlesh commented Apr 1, 2016

Merged with fd0823b. Thanks, as always @trxcllnt

@staltz
Copy link
Member

staltz commented Apr 2, 2016

Weird, how is this PR still open?

@kwonoj
Copy link
Member

kwonoj commented Apr 2, 2016

I think it's just not closed. Let me close it.

@kwonoj kwonoj closed this Apr 2, 2016
@trxcllnt trxcllnt deleted the operators-should-subscribe branch May 9, 2016 21:36
@lock
Copy link

lock bot commented Jun 7, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants