Is there a reason I shouldn't close a channel in the same goroutine I am receiving from it, even if I wait to make sure the sending is done?

后端 未结 0 1750
梦如初夏
梦如初夏 2020-12-02 20:47

Here is the simplest recreation of the code I am considering:

func getPic(name string, picCh chan string) {
    //          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题