Is close(channel) a blocking operation?

Viewed 74

Is close(channel) a blocking operation? Does it wait until the buffered channel has finished consuming messages?

1 Answers

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.

Related