Practically all server applications require synchronization between multiple threads. Most of the work is done for us at the framework level, such as by our web server, DB client or messaging framework. Java and Scala provide a multitude of components to write solid multi-threaded applications. These include object pools, concurrent collections, advanced locks, execution contexts etc.. To better understand these, let’s explore the most synchronization idiom – the Object lock.