Concurrency

Concurrency is a very complex topic, and is one of the most common source of bugs. JVM in general and Scala in particular provide lots of tools, libraries and frameworks which help working with concurrency and abstract away the low-level details of thread management, but introduce another level of semantics which should also be understood by the developer in order not to make more bugs. Therefore, choosing the particular tool should be done judiciously.

Instead of rephrasing the same things in different words, we suggest reading the relevant chapter of the Scala Best Practices document. Consider its items to be fully applied by this document as well.