judge CyclicBarrier to support two ways