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

Scheduler.scheduleRecursive #878

Merged
merged 1 commit into from
Feb 14, 2014

Conversation

benjchristensen
Copy link
Member

Make recursive scheduling a first-class citizen without needing to refer to "this" which doesn't work inside lambdas (Java8/Scala/etc).

        Schedulers.newThread().scheduleRecursive(new Action1<Recurse>() {
            @Override
            public void call(Recurse r) {
                System.out.println("do stuff on thread: " + Thread.currentThread() + " Time: " + System.nanoTime());
                r.schedule(100, TimeUnit.MILLISECONDS);
            }
        });

Make recursive scheduling a first-class citizen without needing to refer to "this" which doesn't work inside lambdas (Java8/Scala/etc).

        Schedulers.newThread().scheduleRecursive(new Action1<Recurse>() {
            @OverRide
            public void call(Recurse r) {
                System.out.println("do stuff on thread: " + Thread.currentThread() + " Time: " + System.nanoTime());
                r.schedule(100, TimeUnit.MILLISECONDS);
            }
        });
benjchristensen added a commit that referenced this pull request Feb 14, 2014
@benjchristensen benjchristensen merged commit ef023d1 into ReactiveX:master Feb 14, 2014
@benjchristensen benjchristensen deleted the scheduleRecursive branch February 14, 2014 20:45
@cloudbees-pull-request-builder

RxJava-pull-requests #810 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.

None yet

2 participants