public class TestCode { public static void main(String[] args) throws InterruptedException { ExecutorService es = Executors.newCachedThreadPool();
int count = 100; AtomicInteger ai = new AtomicInteger(); CyclicBarrier cb = new CyclicBarrier(count);
for (int i = 0; i < count; i++) { es.submit(() -> { int idx = ai.addAndGet(1); cb.await(); FreqABTest cTest = new FreqABTest(); /// C cTest.setFreqAbtestType(idx);