As per the http://blog.golang.org/pipelines, Done channel is used to close the other goroutines once the main returns. But as per the design spec, we don't have to wait for goroutines to close before returning from main as they will be eventually closed when there are no references. And also http://stackoverflow.com/questions/25518531/ok-to-exit-program-with-active-goroutine , says we don't have to close the goroutines ourselves.
My doubt is, Should we always close the running goroutines before exiting main? Thanks! Regards,
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.