[go-nuts] Re: Making concurrent programs to run parallely in Go

2022-06-16 Thread 'Anderson Queiroz' via golang-nuts
You will need a barrier, the wait Group in your case, to guarantee the main goroutine will only continue after all the others have finished their work. Besides if any of your goroutines blocks due to IO the Go scheduler will look for another goroutine to run while the blocked one waits. Another

[go-nuts] Re: Making concurrent programs to run parallely in Go

2022-06-15 Thread Brian Candler
As I understand, it will execute in parallel by default. There's a pool of threads for running goroutines, defaulting initially to the number of cores. If a syscall blocks, then other threads will continue to run - and (I think) an extra thread is started too. > But still I had to use