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

I have a question about the design of the garbage collector of Go. Does it also clean up goroutines that are waiting on a "forgotten" channel? And does this apply for processes waiting for each other in a cycle?


No, goroutines are never cleaned up until they exit. If they are blocked on a channel that no-one else references then they'll be blocked forever.




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

Search: