您当前的位置: 首页 >  golang

【golang】Go语言学习-select用法

phymat.nico 发布时间:2018-01-29 20:32:14 ,浏览量:5

golang 的 select 的功能和 select, poll, epoll 相似, 就是监听 IO 操作,当 IO 操作发生时,触发相应的动作。

示例:

ch1 := make (chan int, 1)
ch2 := make (chan int, 1)

...

select {
case             
关注
打赏
1688896170
查看更多评论
0.0509s