Buffer, which provides a blocking FIFO-buffered semantics for the channel with which it is associated.
为与之相关联的通道提供了一个阻塞的先进先出的缓冲语义。
Both provide a means to tell a sending endpoint that it should "buffer" messages when the transport back channel is not available.
都提供了相应的方法来告知发送端点应该在传输回发通道不可用的情况下“缓存”消息。
A programmer can specify a buffer size - sending to a buffered channel will not block unless the buffer is full, and reading from a buffered channel will not block unless the buffer is empty.
程序员可以指定缓冲大小——想缓冲的channel发送消息不会阻塞,除非缓冲已满,同样从缓冲的channel读取也不会阻塞,除非缓冲是空的。
应用推荐