java.util.concurrent.locks.ReentrantReadWriteLock.hasWaiters()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中java.util.concurrent.locks.ReentrantReadWriteLock.hasWaiters方法的一些代码示例,展示了ReentrantReadWriteLock.hasWaiters的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReentrantReadWriteLock.hasWaiters方法的具体详情如下:
包路径:java.util.concurrent.locks.ReentrantReadWriteLock
类名称:ReentrantReadWriteLock
方法名:hasWaiters

ReentrantReadWriteLock.hasWaiters介绍

[英]Queries whether any threads are waiting on the given condition associated with the write lock. Note that because timeouts and interrupts may occur at any time, a true return does not guarantee that a future signal will awaken any threads. This method is designed primarily for use in monitoring of the system state.
[中]查询是否有线程正在等待与写锁关联的给定条件。请注意,由于超时和中断可能随时发生,因此真正的返回并不保证将来的信号会唤醒任何线程。该方法主要用于监控系统状态。

代码示例

代码示例来源:origin: cinchapi/concourse

@Override
public boolean hasWaiters(Condition condition) {
  return decorated.hasWaiters(condition);
}

代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils

@Override
public boolean hasWaiters(Condition condition) {
  return super.hasWaiters(condition);
}

相关文章