Skip to content

Commit

Permalink
Use MultipleAssignmentSubscription to save an import
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Feb 9, 2015
1 parent c694a2a commit 9f590cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/rx/Scheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import rx.functions.Action0;
import rx.schedulers.Schedulers;
import rx.subscriptions.MultipleAssignmentSubscription;
import rx.subscriptions.SerialSubscription;

/**
* A {@code Scheduler} is an object that schedules units of work. You can find common implementations of this
Expand Down Expand Up @@ -124,7 +123,7 @@ public void call() {
}
}
};
SerialSubscription s = new SerialSubscription();
MultipleAssignmentSubscription s = new MultipleAssignmentSubscription();
// Should call `mas.set` before `schedule`, or the new Subscription may replace the old one.
mas.set(s);
s.set(schedule(recursiveAction, initialDelay, unit));
Expand Down

0 comments on commit 9f590cf

Please sign in to comment.