The interface to read from a channel is called ChannelInput and consists of a single method called read .
从通道读取对象的接口叫作ChannelInput,它只有一个方法,叫作read 。
A process that calls this method on an object implementing the ChannelInput interface will block until an object is actually written on the channel by a process at the other end of the channel.
如果进程调用一个实现ChannelInput接口的对象的这个方法,那么进程会阻塞,直到在通道另一端的进程实际向通道写入了一个对象。
应用推荐