像下面的代码这样的简单 goroutine 通过停止计时器而停止,它会变得干净吗?还是一直留在记忆中直到程序结束?
go func() { <-timer1.C //Will stop before firing. fmt.Println("Timer 1 fired") }()
12345678_0001
相关分类