781 |
|
* property. |
782 |
|
* |
783 |
|
* <p>You may override this method to perform an action with side |
784 |
< |
* effects visible to participating tasks, but doing so requires |
785 |
< |
* care: Method {@code onAdvance} may be invoked more than once |
786 |
< |
* per transition. Further, unless all parties register before |
787 |
< |
* any arrive, and all {@link #awaitAdvance} at each phase, then |
788 |
< |
* you cannot ensure lack of interference from other parties |
789 |
< |
* during the invocation of this method. |
784 |
> |
* effects visible to participating tasks, but it is only sensible |
785 |
> |
* to do so in designs where all parties register before any |
786 |
> |
* arrive, and all {@link #awaitAdvance} at each phase. |
787 |
> |
* Otherwise, you cannot ensure lack of interference from other |
788 |
> |
* parties during the invocation of this method. Additionally, |
789 |
> |
* method {@code onAdvance} may be invoked more than once per |
790 |
> |
* transition if registrations are intermixed with arrivals. |
791 |
|
* |
792 |
|
* @param phase the phase number on entering the barrier |
793 |
|
* @param registeredParties the current number of registered parties |