Grokking Java Interview Questions
Vote

0% completed

​

CountDownLatch, Semaphore, and CyclicBarrier

A program that computes a daily sales report has three rules about the order of its threads:

  • The main thread prints the report only after all three worker threads have finished.
  • At most two threads may call the payment service at the same time.
  • The three workers start round 2 only when all of them have completed round 1.

Each rule has its own class in java.util.concurrent. Such a class is called a synchronizer, because it makes threads wait until a condition about other threads is true

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content