語言

Lock.IsHeldByCurrentThread 屬性

定義

會得到一個值,表示該鎖是否被當前執行緒持有。

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

屬性值

true如果目前的執行緒持有鎖;否則,。 false

適用於