Interface SchedulerMultiWorkerSupport
- All Known Implementing Classes:
ComputationScheduler
,ComputationScheduler.FixedSchedulerPool
public interface SchedulerMultiWorkerSupport
Allows retrieving multiple workers from the implementing
Scheduler
in a way that when asking for
at most the parallelism level of the Scheduler, those
Scheduler.Worker
instances will be running
with different backing threads.
History: 2.1.8 - experimental
- Since:
- 2.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The callback interface for thecreateWorkers(int, WorkerCallback)
method. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createWorkers
(int number, @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback) Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.
-
Method Details
-
createWorkers
void createWorkers(int number, @NonNull @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback) Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.- Parameters:
number
- the number of workers to create, positivecallback
- the callback to send worker instances to
-