defaultMaxIsolatesFor static method

int defaultMaxIsolatesFor({
  1. int workers = 1,
})

The default maxIsolates for each of workers isolates with their own pool (e.g., the APIServerWorkers): half of the processors divided by workers, from 2 to 4.

Implementation

static int defaultMaxIsolatesFor({int workers = 1}) => math.max(
  2,
  math.min(4, (Platform.numberOfProcessors ~/ 2) ~/ math.max(1, workers)),
);