Skip to content

Instantly share code, notes, and snippets.

import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
public class TestItAll {
CyclicBarrier cb = new CyclicBarrier(8);
private volatile boolean working = true;
public static void main(String[] args) throws InterruptedException {