AbstractQueuedLongSynchronizer.TryAcquireSharedNanos(Int64, Int64) Method

Definition

Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.

[Android.Runtime.Register("tryAcquireSharedNanos", "(JJ)Z", "")]
public bool TryAcquireSharedNanos (long arg, long nanosTimeout);
[<Android.Runtime.Register("tryAcquireSharedNanos", "(JJ)Z", "")>]
member this.TryAcquireSharedNanos : int64 * int64 -> bool

Parameters

arg
Int64

the acquire argument. This value is conveyed to #tryAcquireShared but is otherwise uninterpreted and can represent anything you like.

nanosTimeout
Int64

the maximum number of nanoseconds to wait

Returns

Boolean

true if acquired; false if timed out

Attributes

Exceptions

if the current thread is interrupted

Remarks

Java documentation for java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquireSharedNanos(long, 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