[go-nuts] Re: Handling dynamic and unknown number of wait groups?

2017-11-02 Thread David Collier-Brown
You don't even need to do waitgroups if the main() function is the one that is last in the pipeline: cf https://leaflessca.wordpress.com/2017/01/04/forwards-and-backwords-pipes-in-go/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Handling dynamic and unknown number of wait groups?

2017-11-02 Thread David Collier-Brown
You don't even mneed to do weaitgroups if the main() function is the one that is last in the pipeline : cf https://leaflessca.wordpress.com/2017/01/04/forwards-and-backwords-pipes-in-go/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Handling dynamic and unknown number of wait groups?

2017-11-02 Thread howardcshaw
You absolutely can use goroutines without waitgroups! It all depends on what you are doing with them. Where waitgroups come in is when you need to something only after *all* of the goroutines on a specific task are done. Chances are that if you are not using waitgroups, you are either using

[go-nuts] Re: Handling dynamic and unknown number of wait groups?

2017-11-02 Thread kanth909
I am new to Go and I had read numerous times in various articles that one can technically create any number of Go routines and the runtime takes care of them mapping to kernel threads. If so, why does waitGroup designed in a way such that one has to specify how many go routines one need to