SpinLock.IsHeldByCurrentThread 속성

정의

현재 스레드에서 잠금을 보유하고 있는지 여부를 가져옵니다.

public:
 property bool IsHeldByCurrentThread { bool get(); };
public bool IsHeldByCurrentThread { get; }
member this.IsHeldByCurrentThread : bool
Public ReadOnly Property IsHeldByCurrentThread As Boolean

속성 값

현재 스레드에서 잠금을 보유하고 있으면 true이고, 그렇지 않으면 false입니다.

예외

스레드 소유권 추적을 사용할 수 없습니다.

설명

잠금이 소유자 스레드를 추적하도록 초기화된 경우 현재 스레드에서 잠금을 획득했는지 여부를 반환합니다. 스레드 소유권을 추적하지 않도록 잠금이 초기화되었을 때 이 속성을 사용하는 것은 유효하지 않습니다.

적용 대상

추가 정보