Share via


AbstractQueuedLongSynchronizer.ConditionObject.AwaitNanos(Int64) Method

Definition

Implements timed condition wait.

[Android.Runtime.Register("awaitNanos", "(J)J", "")]
public long AwaitNanos (long nanosTimeout);
[<Android.Runtime.Register("awaitNanos", "(J)J", "")>]
abstract member AwaitNanos : int64 -> int64
override this.AwaitNanos : int64 -> int64

Parameters

nanosTimeout
Int64

the maximum time to wait, in nanoseconds

Returns

Implements

Attributes

Exceptions

Remarks

Implements timed condition wait. <ol> <li>If current thread is interrupted, throw InterruptedException. <li>Save lock state returned by #getState. <li>Invoke #release with saved state as argument, throwing IllegalMonitorStateException if it fails. <li>Block until signalled, interrupted, or timed out. <li>Reacquire by invoking specialized version of #acquire with saved state as argument. <li>If interrupted while blocked in step 4, throw InterruptedException. </ol>

Java documentation for java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.awaitNanos(long).

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