예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <inheritdoc/>
 public void SetMaxParallelDegreeByKind(DispatcherKind queueKind, int maxParallelDegree) => m_innerQueue.SetMaxParallelDegreeByKind(queueKind, maxParallelDegree);
예제 #3
0
 private void SetQueueMaxParallelDegree(int maxConcurrency)
 {
     PipQueue.SetMaxParallelDegreeByKind(Kind, maxConcurrency);
 }