When you first start tinkering with concurrency in any language, what's the most sought after goal is extracting the maximum output from the hardware you have available.
That's why we use it and study it in the first place - to achieve optimal parallelism & get some significant speed-up for our apps out of the box.
However, a not so glamorous part of studying the subject is understanding how to write thread-safe code. The techniques and principles which will enable you to keep your application well-behaved, even after scaling it to dozens of threads.
Even though this is an important thing to consider while writing concurrent code, it is often overlooked in most learning resources about concurrency. This problem is even more relevant in the Go community due to two common misunderstandings I will cover in the article.
…