code: private int assignThreads(int splitIndex, int splitCount) {
      	if (threadsPerSplit > 0) {
      		return threadsPerSplit;
      	}
          if (splitCount == 1) {
              return threadCount;
          }
          if (splitCount * minThreads > threadCount) {
              return minThreads;
          }
          if (splitIndex % threadCount < threadCount % splitCount) {
              return threadCount / splitCount + 1;
          } else {
              return threadCount / splitCount;
          }
      }
docs: Assign thread count for a given split
  
  @param splitIndex split index
  @param splitCount
  @return