Package rx.internal.schedulers
Class TrampolineScheduler
java.lang.Object
rx.Scheduler
rx.internal.schedulers.TrampolineScheduler
Schedules work on the current thread but does not execute immediately. Work is put in a queue and executed
after the current unit of work is completed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class(package private) static final classNested classes/interfaces inherited from class rx.Scheduler
Scheduler.Worker -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intcompare(int x, int y) Retrieves or creates a newScheduler.Workerthat represents serial execution of actions.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
TrampolineScheduler
private TrampolineScheduler()
-
-
Method Details
-
createWorker
Description copied from class:SchedulerRetrieves or creates a newScheduler.Workerthat represents serial execution of actions.When work is completed it should be unsubscribed using
Subscription.unsubscribe().Work on a
Scheduler.Workeris guaranteed to be sequential.- Specified by:
createWorkerin classScheduler- Returns:
- a Worker representing a serial queue of actions to be executed
-
compare
static int compare(int x, int y)
-