func write(ch chan int) { for i := 0; i < 10; i++ { fmt.Println("写入:", i) ch <- i time.Sleep(time.Microsecond * 10) } wg.Done() } func read(ch chan int) { for i := 0; i < 10; i++ { fmt.Println("读取:", <-ch) time.Sleep(time.Microsecond * 10) } wg.Done() } 想intChan中放入 1~ 120000个数
(intChan chan int)
source not stored for this graph (policy: none)