次の方法で共有


Phaser.Register Method

Definition

Adds a new unarrived party to this phaser.

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

Returns

the arrival phase number to which this registration applied. If this value is negative, then this phaser has terminated, in which case registration has no effect.

Attributes

Exceptions

if attempting to register more than the maximum supported number of parties

Remarks

Adds a new unarrived party to this phaser. If an ongoing invocation of #onAdvance is in progress, this method may await its completion before returning. If this phaser has a parent, and this phaser previously had no registered parties, this child phaser is also registered with its parent. If this phaser is terminated, the attempt to register has no effect, and a negative value is returned.

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

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