/// <summary> /// Adjusts the total process slots /// </summary> public void AdjustTotalProcessSlots(int newTotalSlots) { // Slots in worker control how many pips should be assigned to the workers for the corresponding PipExecutionStep. // When a pip is assigned to a worker, it does not mean that the pip will start running. // Whether the pip will run or not depends on the limits of the corresponding dispatcher. // That's why, when we update slots of the worker, we also update the dispatcher limit to sync. TotalProcessSlots = newTotalSlots; m_pipQueue.SetMaxParallelDegreeByKind(DispatcherKind.CPU, newTotalSlots); }
/// <inheritdoc/> public void SetMaxParallelDegreeByKind(DispatcherKind queueKind, int maxParallelDegree) => m_innerQueue.SetMaxParallelDegreeByKind(queueKind, maxParallelDegree);
private void SetQueueMaxParallelDegree(int maxConcurrency) { PipQueue.SetMaxParallelDegreeByKind(Kind, maxConcurrency); }