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

Merge overload - possibility A #227

Closed

Conversation

benjchristensen
Copy link
Member

A possible implementation of scheduler overloads on the merge operator.

Related to Schedulers pulled in #225 and issue #19

@benjchristensen
Copy link
Member Author

This implementation uses subscribeOn

See #226 for another implementation using Scheduler.schedule

Is there any reason to use Scheduler.schedule on an internal operator implementation instead of just leveraging subscribeOn (other than when we need the delay arguments of course)?

For example, on a method overload of merge is this okay?

        return merge(source).subscribeOn(scheduler);

or is there some reason to inside the OperationMerge do this:

                return scheduler.schedule(new Func0<Subscription>() {

                    @Override
                    public Subscription call() {
                        return new MergeObservable<T>(o).call(observer);
                    }
                });

They seem to accomplish the same thing but would like to know if there's a reason to prefer one over the other.

I prefer just reusing subscribeOn.

I can't tell from reading C# code what it does as I can't find the extensions that implement the override methods!

@cloudbees-pull-request-builder

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

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.

2 participants