In the solution using CountdownLatch, why are we using 2 latches. If we have 1 instance and initialize it with 2 counts then wont it serve the same purpose?
Thanks.
In the solution using CountdownLatch, why are we using 2 latches. If we have 1 instance and initialize it with 2 counts then wont it serve the same purpose?
Thanks.
referring to the Multithreading_OrderedPrinting solution using CountDownLatch