Here you can find the source of waitForSignal(CountDownLatch b)
static boolean waitForSignal(CountDownLatch b)
//package com.java2s; //License from project: Apache License import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; public class Main { static int timeoutSecs = 2; static boolean waitForSignal(CountDownLatch b) { try {/*w ww.j ava 2 s. co m*/ return b.await(timeoutSecs, TimeUnit.SECONDS); } catch (InterruptedException ie) { return false; } } }