Class ComputationScheduler.FixedSchedulerPool
- java.lang.Object
-
- io.reactivex.rxjava3.internal.schedulers.ComputationScheduler.FixedSchedulerPool
-
- All Implemented Interfaces:
SchedulerMultiWorkerSupport
- Enclosing class:
- ComputationScheduler
static final class ComputationScheduler.FixedSchedulerPool extends java.lang.Object implements SchedulerMultiWorkerSupport
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.reactivex.rxjava3.internal.schedulers.SchedulerMultiWorkerSupport
SchedulerMultiWorkerSupport.WorkerCallback
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
cores
(package private) ComputationScheduler.PoolWorker[]
eventLoops
(package private) long
n
-
Constructor Summary
Constructors Constructor Description FixedSchedulerPool(int maxThreads, java.util.concurrent.ThreadFactory threadFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createWorkers(int number, SchedulerMultiWorkerSupport.WorkerCallback callback)
Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.ComputationScheduler.PoolWorker
getEventLoop()
void
shutdown()
-
-
-
Field Detail
-
cores
final int cores
-
eventLoops
final ComputationScheduler.PoolWorker[] eventLoops
-
n
long n
-
-
Method Detail
-
getEventLoop
public ComputationScheduler.PoolWorker getEventLoop()
-
shutdown
public void shutdown()
-
createWorkers
public void createWorkers(int number, SchedulerMultiWorkerSupport.WorkerCallback callback)
Description copied from interface:SchedulerMultiWorkerSupport
Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.- Specified by:
createWorkers
in interfaceSchedulerMultiWorkerSupport
- Parameters:
number
- the number of workers to create, positivecallback
- the callback to send worker instances to
-
-