英文:
Is close(channel) a blocking operation?
问题
close(channel)是一个阻塞操作吗?它会等待缓冲通道完成消费消息吗?
英文:
Is close(channel) a blocking operation? Does it wait until the buffered channel has finished consuming messages?
答案1
得分: 5
close函数不是一个阻塞操作。该函数记录不会再向通道发送更多的值。
在调用close之后,应用程序可以接收到缓冲的值。
英文:
The close function is not a blocking operation. The function records that no more values will be sent to the channel.
The application can receive buffered values after the call to close.
The specification describes close in more detail.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论