CountdownLatch

Explain CountDownLatch using real life problem? Let me try to explain CountDownLatch with some real life example: Consider you 5 rooms in your house. Your father is at home with 5 servants, and you are calling from office to your father to ask him to check if you have switched Read more…

Compare And Swap in Java

How is the traditional way to control access to shared variables in java? The traditional way to control access to shared fields is to use synchronization. In synchronization, once the thread gets the lock, it gets exclusive access to the block of code. What are the short comings of traditional Read more…