--- jsr166/src/jsr166y/Phaser.java 2008/09/07 11:24:26 1.5 +++ jsr166/src/jsr166y/Phaser.java 2008/10/28 23:03:24 1.6 @@ -102,10 +102,13 @@ import java.lang.reflect.*; * } * }.start(); * } + * + * doSomethingOnBehalfOfWorkers(); * phaser.arrive(); // allow threads to start - * int p = phaser.arriveAndDeregister(); // deregister self + * int p = phaser.arriveAndDeregister(); // deregister self ... + * p = phaser.awaitAdvance(p); // ... and await arrival * otherActions(); // do other things while tasks execute - * phaser.awaitAdvance(p); // wait for all tasks to arrive + * phaser.awaitAdvance(p); // awit final completion * } * *