AbstractQueuedSynchronizer.AcquireInterruptibly(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
以独占模式获取,如果中断,则中止。
[Android.Runtime.Register("acquireInterruptibly", "(I)V", "")]
public void AcquireInterruptibly(int arg);
[<Android.Runtime.Register("acquireInterruptibly", "(I)V", "")>]
member this.AcquireInterruptibly : int -> unit
参数
- arg
- Int32
获取参数。 此值将传达给 #tryAcquire 但未解释,并且可以表示你喜欢的任何内容。
- 属性
例外
如果当前线程中断
注解
以独占模式获取,如果中断,则中止。 通过首先检查中断状态来实现,然后至少调用一次 #tryAcquire,并在成功时返回。 否则,线程会排队,可能反复阻止和取消阻止,直到 #tryAcquire 成功或线程中断为止。 此方法可用于实现方法 Lock#lockInterruptibly。
Java文档java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(int)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。