问题

chan

怎么答

chan关闭前chanbufferchantruechanbufferchanchannelboolfalsechanpanic

举例

1. 写已经关闭的 chan
send on closed channel
2. 读已经关闭的 chan

多问一句

chanpanic
c.closed != 0"send on closed channel"
chan
c.closed != 0 && c.qcount == 0eptypedmemclrchan