In this article, multiple types of synchronization, locking and thread-safety techniques in Java and Kotlin are explained through interactive examples.

What is Synchronization?

In a multi-threaded world, we need to access shared objects across threads, and If we do not synchronize our work, unwanted situations can occur.

First let’s see a basic example…

Adib Faramarzi

Android Team Lead at Tapsi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store