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
  • Method Details

    • createWorkers

      void createWorkers(int number, @NonNull @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback)
      Creates the given number of Scheduler.Worker instances that are possibly backed by distinct threads and calls the specified Consumer with them.
      Parameters:
      number - the number of workers to create, positive
      callback - the callback to send worker instances to