Partager via


Phaser.ArriveAndAwaitAdvance Method

Definition

Arrives at this phaser and awaits others.

[Android.Runtime.Register("arriveAndAwaitAdvance", "()I", "GetArriveAndAwaitAdvanceHandler")]
public virtual int ArriveAndAwaitAdvance ();
[<Android.Runtime.Register("arriveAndAwaitAdvance", "()I", "GetArriveAndAwaitAdvanceHandler")>]
abstract member ArriveAndAwaitAdvance : unit -> int
override this.ArriveAndAwaitAdvance : unit -> int

Returns

the arrival phase number, or the (negative) #getPhase() current phase if terminated

Attributes

Exceptions

if not terminated and the number of unarrived parties would become negative

Remarks

Arrives at this phaser and awaits others. Equivalent in effect to awaitAdvance(arrive()). If you need to await with interruption or timeout, you can arrange this with an analogous construction using one of the other forms of the awaitAdvance method. If instead you need to deregister upon arrival, use awaitAdvance(arriveAndDeregister()).

It is a usage error for an unregistered party to invoke this method. However, this error may result in an IllegalStateException only upon some subsequent operation on this phaser, if ever.

Java documentation for java.util.concurrent.Phaser.arriveAndAwaitAdvance().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to