다음을 통해 공유


ReentrantReadWriteLock.ReentrantWriteLock.HoldCount Property

Definition

Queries the number of holds on this write lock by the current thread.

public virtual int HoldCount { [Android.Runtime.Register("getHoldCount", "()I", "GetGetHoldCountHandler")] get; }
[<get: Android.Runtime.Register("getHoldCount", "()I", "GetGetHoldCountHandler")>]
member this.HoldCount : int

Property Value

the number of holds on this lock by the current thread, or zero if this lock is not held by the current thread

Attributes

Remarks

Queries the number of holds on this write lock by the current thread. A thread has a hold on a lock for each lock action that is not matched by an unlock action. Identical in effect to ReentrantReadWriteLock#getWriteHoldCount.

Added in 1.6.

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

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