Replace Parallelize with function ParallelizeUntil and formally deprecate the Parallelize

This commit is contained in:
Guoliang Wang
2018-09-07 17:17:27 +08:00
parent 6e88271a61
commit c2622dd9d8
10 changed files with 25 additions and 15 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package priorities
import (
"context"
"sync"
"k8s.io/api/core/v1"
@@ -210,7 +211,7 @@ func (ipa *InterPodAffinity) CalculateInterPodAffinityPriority(pod *v1.Pod, node
}
}
}
workqueue.Parallelize(16, len(allNodeNames), processNode)
workqueue.ParallelizeUntil(context.TODO(), 16, len(allNodeNames), processNode)
if pm.firstError != nil {
return nil, pm.firstError
}