95

Go Channel 应用模式 | 鸟窝

 6 years ago
source link: http://colobu.com/2018/03/26/channel-patterns/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Channel是Go中的一种类型,和goroutine一起为Go提供了并发技术, 它在开发中得到了广泛的应用。Go鼓励人们通过Channel在goroutine之间传递数据的引用(就像把数据的owner从一个goroutine传递给另外一个goroutine), Effective Go总结了这么一句话:Do not communicate by sharing memory; instead

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK