摘要: /* 一个安全关闭的的协程模型 */ type MyChannel struct { C chan struct{} once sync.Once } func NewMyChannel() *MyChannel { return &MyChannel{C: make(chan struct{})} 阅读全文
posted @ 2021-09-15 17:54 Kingram 阅读(736) 评论(0) 推荐(0) 编辑