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 interfaceThe callback interface for thecreateWorkers(int, WorkerCallback)method. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateWorkers(int number, @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback) Creates the given number ofScheduler.Workerinstances that are possibly backed by distinct threads and calls the specifiedConsumerwith them.
-
Method Details
-
createWorkers
void createWorkers(int number, @NonNull @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback) Creates the given number ofScheduler.Workerinstances that are possibly backed by distinct threads and calls the specifiedConsumerwith them.- Parameters:
number- the number of workers to create, positivecallback- the callback to send worker instances to
-