Go 性能优化技巧 6/10

Go 使用 channel 实现 CSP 模型。处理双方仅关注通道和数据本身,无需理会对方身份和数量,以此实现结构性解耦。在各文宣中都有 “Don't communicate by sharing memory, share memory by communicating.” 这类说法。但这并非鼓励我们不分场合,教条地使用 channel。 在我看来,channel 多数时候适用于结构层面,而非单
相关文章
相关标签/搜索