Share via


ReentrantReadWriteLock.ReentrantWriteLock.Unlock Method

Definition

Attempts to release this lock.

[Android.Runtime.Register("unlock", "()V", "GetUnlockHandler")]
public virtual void Unlock ();
[<Android.Runtime.Register("unlock", "()V", "GetUnlockHandler")>]
abstract member Unlock : unit -> unit
override this.Unlock : unit -> unit

Implements

Attributes

Exceptions

if the current thread does not hold this lock.

Remarks

Attempts to release this lock.

If the current thread is the holder of this lock then the hold count is decremented. If the hold count is now zero then the lock is released. If the current thread is not the holder of this lock then IllegalMonitorStateException is thrown.

Java documentation for java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.unlock().

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