Share via


Phaser.AwaitAdvanceInterruptibly Method

Definition

Overloads

AwaitAdvanceInterruptibly(Int32)

Awaits the phase of this phaser to advance from the given phase value, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

AwaitAdvanceInterruptibly(Int32, Int64, TimeUnit)

Awaits the phase of this phaser to advance from the given phase value or the given timeout to elapse, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

AwaitAdvanceInterruptibly(Int32)

Awaits the phase of this phaser to advance from the given phase value, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

[Android.Runtime.Register("awaitAdvanceInterruptibly", "(I)I", "GetAwaitAdvanceInterruptibly_IHandler")]
public virtual int AwaitAdvanceInterruptibly (int phase);
[<Android.Runtime.Register("awaitAdvanceInterruptibly", "(I)I", "GetAwaitAdvanceInterruptibly_IHandler")>]
abstract member AwaitAdvanceInterruptibly : int -> int
override this.AwaitAdvanceInterruptibly : int -> int

Parameters

phase
Int32

an arrival phase number, or negative value if terminated; this argument is normally the value returned by a previous call to arrive or arriveAndDeregister.

Returns

the next arrival phase number, or the argument if it is negative, or the (negative) #getPhase() current phase if terminated

Attributes

Exceptions

if thread interrupted while waiting

Remarks

Awaits the phase of this phaser to advance from the given phase value, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

Java documentation for java.util.concurrent.Phaser.awaitAdvanceInterruptibly(int).

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

AwaitAdvanceInterruptibly(Int32, Int64, TimeUnit)

Awaits the phase of this phaser to advance from the given phase value or the given timeout to elapse, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

[Android.Runtime.Register("awaitAdvanceInterruptibly", "(IJLjava/util/concurrent/TimeUnit;)I", "GetAwaitAdvanceInterruptibly_IJLjava_util_concurrent_TimeUnit_Handler")]
public virtual int AwaitAdvanceInterruptibly (int phase, long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("awaitAdvanceInterruptibly", "(IJLjava/util/concurrent/TimeUnit;)I", "GetAwaitAdvanceInterruptibly_IJLjava_util_concurrent_TimeUnit_Handler")>]
abstract member AwaitAdvanceInterruptibly : int * int64 * Java.Util.Concurrent.TimeUnit -> int
override this.AwaitAdvanceInterruptibly : int * int64 * Java.Util.Concurrent.TimeUnit -> int

Parameters

phase
Int32

an arrival phase number, or negative value if terminated; this argument is normally the value returned by a previous call to arrive or arriveAndDeregister.

timeout
Int64

how long to wait before giving up, in units of unit

unit
TimeUnit

a TimeUnit determining how to interpret the timeout parameter

Returns

the next arrival phase number, or the argument if it is negative, or the (negative) #getPhase() current phase if terminated

Attributes

Exceptions

if thread interrupted while waiting

if timed out while waiting

Remarks

Awaits the phase of this phaser to advance from the given phase value or the given timeout to elapse, throwing InterruptedException if interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.

Java documentation for java.util.concurrent.Phaser.awaitAdvanceInterruptibly(int, long, java.util.concurrent.TimeUnit).

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