Software development, Technology

Making Threads Work Together — Synchronization

Picture a kitchen in India with two cooks, Gautam and Badal. They’re both preparing delicious dishes, but there’s a unique spice box they both want to use. However, only one cook can use it at a time. Here’s how they ensure a flavorful collaboration: Diverse Tasks: Gautam is making biryani, and Badal is crafting curry....

by Tushar Saxena
Tag: lock
24-Apr-2024

Grails

Groovy Goodness – ReadWriteLocks

We often use synchronization. Imagine you have a use case in which there is some resource upon which writing is not done as much as compared to reading. So multiple threads should be able to read concurrently same resource without any problems. But if a single thread wants to write to the resource, for that all new threads for reading...

by Parampreet Singh
Tag: lock
02-Dec-2014