I am using an ExecutorService to implement a 3-thread pool, and CountDownLatch to monitor the completion of all threads, for further processing.
ExecutorService
Use the overloaded variant of await that accepts a timeout.
countDownLatch.await(45, TimeUnit.SECONDS);