Phaser
Class Phaser
- java.lang.Object
-
- java.util.concurrent.Phaser
public class Phaser extends Object
A reusable synchronization barrier, similar in functionality to CyclicBarrier
and CountDownLatch
but supporting more flexible usage.
Registration. Unlike the case for other barriers, the number of parties registered to synchronize on a phaser may vary over time. Tasks may be registered at any time (using methods register()
, bulkRegister(int)
, or forms of constructors establishing initial numbers of parties), and optionally deregistered upo