Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this something go developers also have to be careful with when using goroutines?


No. But sometimes goroutines have the opposite problem, where they don’t terminate and get cleaned up.

https://betterprogramming.pub/common-goroutine-leaks-that-yo...


Is there an (easy?) test for checking goroutine leaks?


Yes, it's visible on goroutine profile, provided by built-in profiler pprof. E.g.: https://github.com/mysteriumnetwork/node/issues/5311#issueco...


No. Goroutines don’t generate a reference to hold onto, either. They just run until they or the program terminate.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: