Synchronisation Patterns
The main concern when you deal with concurrency is shared, mutable state or as Tony Van Eerd put it in his CppCon 2014 talk “Lock-free by Example”: “Forget what you learned in Kindergarten (ie stop Sharing)”.
![Mutable, shared state](https://static.packt-cdn.com/products/9781839211027/graphics/Images/SynchronisationPatterns----MutableShared.png)
A necessary condition for a data race is a mutable, shared state. If you handle sharing or mutation, no data race can happen. This is exactly the focus of the next two sections: Dealing with Sharing and Dealing with Mutation.