AbstractQueuedSynchronizer.ConditionObject.AwaitNanos(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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>
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.