The NumberDispenser class that we introduced in the previous blogs works fine for a single thread. However, if multiple threads start requesting for numbers, there is a possibility that two threads might get the same number. The problem is that while a thread is in the dispense method it might be preemptedĀ right after it […]
Thread Safe Number Dispenser
- Post author By Anupam Chandra (AC)
- Post date
- Categories In Scala, Software
- No Comments on Thread Safe Number Dispenser
