[skip ci] Add desc comments for ProcessFuncParallel (#9130)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
dragondriver 2021-10-03 10:37:59 +08:00 committed by GitHub
parent 9b095843e4
commit 7d87f0368f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ func GetFunctionName(i interface{}) string {
}
// Reference: https://stackoverflow.com/questions/40809504/idiomatic-goroutine-termination-and-error-handling
// ProcessFuncParallel process function in parallel.
func ProcessFuncParallel(total, maxParallel int, f func(idx int) error, fname string) error {
if maxParallel <= 0 {
maxParallel = 1