Scheduler Simplification#1047
Conversation
|
RxJava-pull-requests #962 SUCCESS |
|
In ExecutorScheduler, the innerSubscription is replaced if schedule is called multiple times, for example, with different delay values; unsubscribing the inner cancels only the latest schedule. Is this intentional? |
|
No it's not intentional. Thanks for seeing that. The I'm leaning heavily towards deleting I will replace the |
|
Merging this ... don't want to conflate this PR with the one where I eliminate ExecutorScheduler. |
Scheduler Simplification
API redesign (simplification) as per discussion at #997
The
SchedulerAPI in this pull request is:While migrating to this I found a 4th use case in addition to the previously discussed 3 that required the
schedulemethods insideInnerto also returnSubscriptionfor canceling the individual tasks as opposed to the entireInner.Here are the use cases:
1) Single Action
with lambda
2) Inner Recursion
3) Outer Recursion
4) Outer Recursion with Task Cancellation
This is used for things like
debounceandthrottleLastwhere tasks are being scheduled and cancelled asonNextnotifications are received.