public final class ExecutorScheduler extends Scheduler
Note that thread-hopping is unavoidable with this kind of Scheduler as we don't know about the underlying threading behavior of the executor.
Scheduler.Worker
Constructor and Description |
---|
ExecutorScheduler(Executor executor) |
Modifier and Type | Method and Description |
---|---|
Scheduler.Worker |
createWorker()
Retrieves or creates a new
Scheduler.Worker that represents serial execution of actions. |
public ExecutorScheduler(Executor executor)
public Scheduler.Worker createWorker()
Scheduler
Scheduler.Worker
that represents serial execution of actions.
When work is completed it should be unsubscribed using Subscription.unsubscribe()
.
Work on a Scheduler.Worker
is guaranteed to be sequential.
createWorker
in class Scheduler
Copyright © 2018. All rights reserved.