Hacker News new | ask | show | jobs
by SamReidHughes 4601 days ago
Have the things in the channel be the equivalent of C#'s IDisposable or something, then the goroutine can clean them up itself.
1 comments

Have you read pcwalton example?

How can the goroutine clean them if it is dead?

Sorry, the words coming out of my fingers didn't match the thought in my mind. The channel can dispose of them.