public final class NewThreadScheduler extends Scheduler
Scheduler.Worker
Constructor and Description |
---|
NewThreadScheduler() |
NewThreadScheduler(ThreadFactory threadFactory) |
Modifier and Type | Method and Description |
---|---|
Scheduler.Worker |
createWorker()
Retrieves or creates a new
Scheduler.Worker that represents sequential execution of actions. |
clockDriftTolerance, now, scheduleDirect, scheduleDirect, schedulePeriodicallyDirect, shutdown, start, when
public NewThreadScheduler()
public NewThreadScheduler(ThreadFactory threadFactory)
@NonNull public Scheduler.Worker createWorker()
Scheduler
Scheduler.Worker
that represents sequential execution of actions.
When work is completed, the Worker
instance should be released
by calling Disposable.dispose()
to avoid potential resource leaks in the
underlying task-execution scheme.
Work on a Scheduler.Worker
is guaranteed to be sequential and non-overlapping.
createWorker
in class Scheduler
Copyright © 2019. All rights reserved.