Package rx.internal.schedulers
Class NewThreadScheduler
- java.lang.Object
-
- rx.Scheduler
-
- rx.internal.schedulers.NewThreadScheduler
-
public final class NewThreadScheduler extends Scheduler
Schedules work on a new thread.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class rx.Scheduler
Scheduler.Worker
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ThreadFactory
threadFactory
-
Constructor Summary
Constructors Constructor Description NewThreadScheduler(java.util.concurrent.ThreadFactory threadFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scheduler.Worker
createWorker()
Retrieves or creates a newScheduler.Worker
that represents serial execution of actions.
-
-
-
Method Detail
-
createWorker
public Scheduler.Worker createWorker()
Description copied from class:Scheduler
Retrieves or creates a newScheduler.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.- Specified by:
createWorker
in classScheduler
- Returns:
- a Worker representing a serial queue of actions to be executed
-
-