Top Description Fields Constructors Methods
io.reactivex.internal.schedulers

public final Class NewThreadScheduler

extends Scheduler
Class Inheritance
Imports
io.reactivex.Scheduler, io.reactivex.annotations.NonNull, java.util.concurrent.ThreadFactory

Schedules work on a new thread.

Field Summary

Modifier and TypeField and Description
private static final String
KEY_NEWTHREAD_PRIORITY

The name of the system property for setting the thread priority for this Scheduler.

private static final RxThreadFactory
private static final String
pack-priv final ThreadFactory

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Scheduler.Worker
createWorker()

Implements abstract io.reactivex.Scheduler.createWorker.

Retrieves or creates a new Scheduler.Worker that represents sequential execution of actions.
Inherited from io.reactivex.Scheduler:
clockDriftTolerancenowscheduleDirectscheduleDirectschedulePeriodicallyDirectshutdownstartwhen

Field Detail

KEY_NEWTHREAD_PRIORITYback to summary
private static final String KEY_NEWTHREAD_PRIORITY

The name of the system property for setting the thread priority for this Scheduler.

THREAD_FACTORYback to summary
private static final RxThreadFactory THREAD_FACTORY
THREAD_NAME_PREFIXback to summary
private static final String THREAD_NAME_PREFIX
threadFactoryback to summary
pack-priv final ThreadFactory threadFactory

Constructor Detail

NewThreadSchedulerback to summary
public NewThreadScheduler()
NewThreadSchedulerback to summary
public NewThreadScheduler(ThreadFactory threadFactory)

Method Detail

createWorkerback to summary
public Scheduler.Worker createWorker()

Implements abstract io.reactivex.Scheduler.createWorker.

Doc from io.reactivex.Scheduler.createWorker.

Retrieves or creates a new Scheduler.Worker that represents sequential execution of actions.

When work is completed, the Worker instance should be released by calling Scheduler.Worker#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.

Returns:Scheduler.Worker

a Worker representing a serial queue of actions to be executed

Annotations
@NonNull
@Override