无缓冲channel的内存泄漏问题:无缓冲channel在go程里done <- hardWork(job)时,如果外层执行完了后,done <- hardWork(job)写操作<- 会一直阻塞
➜ go run timeout.go elapsed: 2.005725931s number of goroutines: 1001
无缓冲channel的内存泄漏问题:无缓冲channel在go程里done <- hardWork(job)时,如果外层执行完了后,done <- hardWork(job)写操作<- 会一直阻塞
➜ go run timeout.go elapsed: 2.005725931s number of goroutines: 1001
上一篇:Golang之函数选项模式
一次由JVM堆外内存泄漏引发的POD重启问题的解决之路。
一个有缓冲的通道并指定了容量,那么在这个通道的生命周期内,我们将再也无法改
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M