题目序号:(3597、2008)
题目来源: 百度 、shein
频次:2
答案1:(栾龙生)
关闭已关闭的通道
会引发panic: close of closed channel
//关闭一个已经关闭的管道
func main() {
channel := make(chan int, 10)
close(channel)
close(channel)
}
/*[Output]: panic: close of closed channel */
本文来自投稿,不代表本站立场,如若转载,请注明出处: