摘要:
WithCancel go func propagateCancel(parent Context, child canceler) { if parent.Done() == nil { return // parent is never canceled } // 判断 parent 是否为 c 阅读全文
摘要:
```go func Test_chanel(t testing.T) { c := make(chan int, 1) go func() { time.Sleep(time.Second 3) close(c) }() for { select { case i := 阅读全文