golang select 和 chan的疑问
golang select 和 chan的疑问

问题内容funcsecond\_115(){i:=0f:=func()int{i++returni}ch:=make(chanint,1)//ch<-f()select{casech<-f():fmt.Println("hello")default:fmt.Println(i)

2023-01-19
100

热门专题

更多
返回顶部