calculateIsolatesCount method

  1. @visibleForTesting
int calculateIsolatesCount()

Implementation

@visibleForTesting
int calculateIsolatesCount() {
  final isolatesCountForTest = testIsolatesCount;
  if (isolatesCountForTest != null) {
    return isolatesCountForTest;
  } else {
    final numberOfProcessors = Platform.numberOfProcessors;
    final isolatesCount = max(1, (numberOfProcessors / 2).floor());
    return isolatesCount;
  }
}