Is close(channel) a blocking operation? Does it wait until the buffered channel has finished consuming messages?
Is close(channel) a blocking operation? Does it wait until the buffered channel has finished consuming messages?
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.