简体   繁体   中英

Is close(channel) a blocking operation?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM