mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
12 lines
199 B
Go
12 lines
199 B
Go
package fx
|
|
|
|
import "github.com/tal-tech/go-zero/core/threading"
|
|
|
|
func Parallel(fns ...func()) {
|
|
group := threading.NewRoutineGroup()
|
|
for _, fn := range fns {
|
|
group.RunSafe(fn)
|
|
}
|
|
group.Wait()
|
|
}
|