How to fix the deadlock in this code, and extend it so that it can wait on a channel which has no writers?

后端 未结 0 1334
面向向阳花
面向向阳花 2021-02-19 15:33

I\'m trying to learn channels in Golang, so this is a contrived example of having a channel where there are multiple writers, but only one reader. This is a very basic example,

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