CountDownLatch using wait() and notifyAll()