Compartir a través de


StampedLock.TryOptimisticRead Method

Definition

Returns a stamp that can later be validated, or zero if exclusively locked.

[Android.Runtime.Register("tryOptimisticRead", "()J", "GetTryOptimisticReadHandler", ApiSince=24)]
public virtual long TryOptimisticRead ();
[<Android.Runtime.Register("tryOptimisticRead", "()J", "GetTryOptimisticReadHandler", ApiSince=24)>]
abstract member TryOptimisticRead : unit -> int64
override this.TryOptimisticRead : unit -> int64

Returns

a valid optimistic read stamp, or zero if exclusively locked

Attributes

Remarks

Returns a stamp that can later be validated, or zero if exclusively locked.

Java documentation for java.util.concurrent.locks.StampedLock.tryOptimisticRead().

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