語言

ReentrantReadWriteLock.ReentrantWriteLock.IsHeldByCurrentThread 屬性

定義

查詢這個寫入鎖是否被當前執行緒持有。

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 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於