ReentrantReadWriteLock.ReentrantReadLock.Lock 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.
Acquires the read lock.
[Android.Runtime.Register("lock", "()V", "GetLockHandler")]
public virtual void Lock ();
[<Android.Runtime.Register("lock", "()V", "GetLockHandler")>]
abstract member Lock : unit -> unit
override this.Lock : unit -> unit
Implements
- Attributes
Remarks
Acquires the read lock.
Acquires the read lock if the write lock is not held by another thread and returns immediately.
If the write lock is held by another thread then the current thread becomes disabled for thread scheduling purposes and lies dormant until the read lock has been acquired.
Java documentation for java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.lock()
.
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.