PoolExecutor constructor

PoolExecutor({
  1. required int concurrency,
  2. ExecutorDelegateFactory? executorFactory,
})

Implementation

PoolExecutor(
    {required int concurrency, ExecutorDelegateFactory? executorFactory}) {
  assert(concurrency > 0);
  final delegateFactory = executorFactory == null
      ? (index) => IsolateExecutor()
      : (index) => executorFactory();
  _delegates = List.generate(concurrency, delegateFactory);
}