SpinLock.IsHeldByCurrentThread Property
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.
Gets whether the lock is held by the current thread.
public:
property bool IsHeldByCurrentThread { bool get(); };
public bool IsHeldByCurrentThread { get; }
member this.IsHeldByCurrentThread : bool
Public ReadOnly Property IsHeldByCurrentThread As Boolean
Property Value
true if the lock is held by the current thread; otherwise false.
Exceptions
Thread ownership tracking is disabled.
Remarks
If the lock was initialized to track owner threads, this will return whether the lock is acquired by the current thread. It is invalid to use this property when the lock was initialized to not track thread ownership.
Applies to
See also
GitHub'da bizimle işbirliği yapın
Bu içeriğin kaynağı GitHub'da bulunabilir; burada ayrıca sorunları ve çekme isteklerini oluşturup gözden geçirebilirsiniz. Daha fazla bilgi için katkıda bulunan kılavuzumuzu inceleyin.