What is the recommended / best way to implement a blocking function call in Java, that can be later unblocked by a call from another thread?
Basically I want to have
There are a couple of different approaches and primitives available, but the most appropriate sounds like a CyclicBarrier or a CountDownLatch.