Locking is a straightforward idea to protect a critical section. A critical section is a section of code that, at most, one thread can use at any time. Dealing with Mutation: Locking by Rainer Grimm From the article: Scoped locking is the idea of RAII applied to a mutex. Scoped locking is also known as synchronized block and guard. The key idea of this idi…