The test does not use Done channel, so fix that.
Change-Id: I795feab2e95de815b8b6ee7a7fd90f19f7af7db1
Reviewed-on: https://go-review.googlesource.com/c/go/+/294749
Reviewed-by: Sameer Ajmani <sameer@golang.org>
Trust: Sameer Ajmani <sameer@golang.org>
Trust: Cody Oss <codyoss@google.com>
Run-TryBot: Sameer Ajmani <sameer@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
parent, cancelParent := WithCancel(Background())
child, cancelChild := WithCancel(parent)
go func() {
- parent.Done()
+ <-parent.Done()
cancelChild()
}()
cancelParent()