摘要: 基于channel实现的,两个协程交替打印出1-100 package main import ( "fmt" "sync" ) var ( toOdd = make(chan struct{}) toEven = make(chan struct{}) wg = sync.WaitGroup{} 阅读全文
posted @ 2022-03-08 17:14 宝树呐 阅读(955) 评论(0) 推荐(0) 编辑