I am new to golang trying to understand concurrency pattern in golang
I am trying to calculate square of set of numbers concurrently but every time it’s calculating in sequential manner. i.e from 0 to 25 in sequence. Am I doing something wrong ?
Any help would be appreciated. Thanks in advance.
The execution is so fast that one worker does all the calculations and the others have not even started yet. The sleeping gives a chance to the other workers to do their job.