摘要:
package main import ( "fmt" "sync" "time" ) var wggg sync.WaitGroup //申明管道类型 queue <-chan string queue 是管道名称 <-chan 管道类型 单向管道还是双向管道 string 是申明管道中传输的数据 阅读全文
posted @ 2022-01-29 11:11
kevin_yang123
阅读(185)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "sync" "time" ) /* channel提供了一种通信机制 定向 消息队列 */ var wgt sync.WaitGroup //消费者 func cousumer(queue chan string){ defer wgt.Do 阅读全文
posted @ 2022-01-29 10:26
kevin_yang123
阅读(371)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "sync" ) /* channel提供了一种通信机制 定向 消息队列 */ var wgt sync.WaitGroup //消费者 func cousumer(queue chan string){ defer wgt.Done() da 阅读全文
posted @ 2022-01-29 10:01
kevin_yang123
阅读(32)
评论(0)
推荐(0)
浙公网安备 33010602011771号