Class IoScheduler.EventLoopWorker
java.lang.Object
io.reactivex.rxjava3.core.Scheduler.Worker
io.reactivex.rxjava3.internal.schedulers.IoScheduler.EventLoopWorker
- All Implemented Interfaces:
Disposable,Runnable
- Enclosing class:
IoScheduler
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicBooleanprivate final IoScheduler.CachedWorkerPoolprivate final CompositeDisposableprivate final IoScheduler.ThreadWorker -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.reactivex.rxjava3.core.Scheduler.Worker
now, schedule, schedulePeriodically
-
Field Details
-
tasks
-
pool
-
threadWorker
-
once
-
-
Constructor Details
-
EventLoopWorker
EventLoopWorker(IoScheduler.CachedWorkerPool pool)
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
run
public void run() -
isDisposed
public boolean isDisposed()Description copied from interface:DisposableReturns true if this resource has been disposed.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if this resource has been disposed
-
schedule
@NonNull public @NonNull Disposable schedule(@NonNull @NonNull Runnable action, long delayTime, @NonNull @NonNull TimeUnit unit) Description copied from class:Scheduler.WorkerSchedules an Runnable for execution at some point in the future specified by a time delay relative to the current time.Note to implementors: non-positive
delayTimeshould be regarded as non-delayed schedule, i.e., as if theScheduler.Worker.schedule(Runnable)was called.- Specified by:
schedulein classScheduler.Worker- Parameters:
action- the Runnable to scheduledelayTime- time to "wait" before executing the action; non-positive values indicate an non-delayed scheduleunit- the time unit ofdelayTime- Returns:
- a Disposable to be able to unsubscribe the action (cancel it if not executed)
-