You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
219 B

package main
import (
"sync"
"time"
)
func main() {
var wg sync.WaitGroup
wg.Add(100)
for i :=0; i < 100; i++ {
go func(wg *sync.WaitGroup) {
time.Sleep(time.Minute* 5)
wg.Done()
}(&wg)
}
wg.Wait()
}