ReentrantReadWriteLock.ReentrantWriteLock.IsHeldByCurrentThread 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
查詢這個寫入鎖是否被當前執行緒持有。
public virtual bool IsHeldByCurrentThread { [Android.Runtime.Register("isHeldByCurrentThread", "()Z", "GetIsHeldByCurrentThreadHandler")] get; }
[<get: Android.Runtime.Register("isHeldByCurrentThread", "()Z", "GetIsHeldByCurrentThreadHandler")>]
member this.IsHeldByCurrentThread : bool
屬性值
true如果當前執行緒持有此鎖,否則false
- 屬性
備註
查詢這個寫入鎖是否被當前執行緒持有。 在效果上與 ReentrantReadWriteLock#isWriteLockedByCurrentThread相同。
新增於1.6版本。
Java 文件 java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.isHeldByCurrentThread()。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。