github.com/shuguocloud/go-zero@v1.3.0/core/fx/parallel.go (about) 1 package fx 2 3 import "github.com/shuguocloud/go-zero/core/threading" 4 5 // Parallel runs fns parallelly and waits for done. 6 func Parallel(fns ...func()) { 7 group := threading.NewRoutineGroup() 8 for _, fn := range fns { 9 group.RunSafe(fn) 10 } 11 group.Wait() 12 }