On Wed, May 12, 2021 at 6:43 PM qinggeer Bao wrote:
>
> In the cancel method of timerCtx type:
>
> func (c *timerCtx) cancel(removeFromParent bool, err error) {
> c.cancelCtx.cancel(false, err)
> if removeFromParent {
> // Remove this timerCtx from its parent cancelCtx's children.
In the cancel method of timerCtx type:
func (c *timerCtx) cancel(removeFromParent bool, err error) {
c.cancelCtx.cancel(false, err)
if removeFromParent {
// Remove this timerCtx from its parent cancelCtx's children.
removeChild(c.cancelCtx.Context, c)
}
c.mu.Lock()