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