!无论怎样都不应该在接收端关闭channel
,因为在接收端无法判断发送端是否还会向通道中发送元素值
!试图向已经关闭的channel
发送数据会导致panic
!关闭已经关闭的channel
会导致panic
https://blog.csdn.net/qq_33296108/article/details/82731686
原文地址:https://www.cnblogs.com/longchang/p/12217668.html
时间: 2024-11-07 04:08:42