Java Multithreading, Concurrency, and Parallelism — Part 8
Synchronized and the depths of it — The monitors
NOTE: Dear Readers, please follow the content till the end as I tried to explain the things at the bytecode level as this is the core of multithreading in Java. If this is understood most of the java multithreading will be a cake walk for the reader.
In Part-7 we have seen how we can make a class thread-safe using
synchronized keyword. We will now have an in-depth understanding of it by looking at the bytecodes.