StampedLock.AsReadLock 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.
Returns a plain Lock
view of this StampedLock in which
the Lock#lock
method is mapped to #readLock
,
and similarly for other methods.
[Android.Runtime.Register("asReadLock", "()Ljava/util/concurrent/locks/Lock;", "GetAsReadLockHandler", ApiSince=24)]
public virtual Java.Util.Concurrent.Locks.ILock? AsReadLock ();
[<Android.Runtime.Register("asReadLock", "()Ljava/util/concurrent/locks/Lock;", "GetAsReadLockHandler", ApiSince=24)>]
abstract member AsReadLock : unit -> Java.Util.Concurrent.Locks.ILock
override this.AsReadLock : unit -> Java.Util.Concurrent.Locks.ILock
Returns
the lock
- Attributes
Remarks
Returns a plain Lock
view of this StampedLock in which the Lock#lock
method is mapped to #readLock
, and similarly for other methods. The returned Lock does not support a Condition
; method Lock#newCondition()
throws UnsupportedOperationException
.
Java documentation for java.util.concurrent.locks.StampedLock.asReadLock()
.
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.