github.com/gogf/gf@v1.16.9/.example/os/glog/glog_stdout.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/gogf/gf/frame/g"
     5  	"sync"
     6  )
     7  
     8  func main() {
     9  	var (
    10  		wg = sync.WaitGroup{}
    11  		ch = make(chan struct{})
    12  	)
    13  	wg.Add(3000)
    14  	for i := 0; i < 3000; i++ {
    15  		go func() {
    16  			<-ch
    17  			g.Log().Println("abcdefghijklmnopqrstuvwxyz1234567890")
    18  			wg.Done()
    19  		}()
    20  	}
    21  	close(ch)
    22  	wg.Wait()
    23  }