"Java concurrency and parallelism: barrier synchronizers (CountDownLatch, CyclicBarrier, Phaser)" article and source code.