本文整理了Java中java.util.concurrent.ForkJoinPool.getStealCount()
方法的一些代码示例,展示了ForkJoinPool.getStealCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ForkJoinPool.getStealCount()
方法的具体详情如下:
包路径:java.util.concurrent.ForkJoinPool
类名称:ForkJoinPool
方法名:getStealCount
[英]Returns an estimate of the total number of tasks stolen from one thread's work queue by another. The reported value underestimates the actual total number of steals when the pool is not quiescent. This value may be useful for monitoring and tuning fork/join programs: in general, steal counts should be high enough to keep threads busy, but low enough to avoid overhead and contention across threads.
[中]
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public Long getValue() {
return fjPool().getStealCount();
}
});
代码示例来源:origin: coffeewar/enode-master
@Override
public long getStealCount() {
return java.util.concurrent.ForkJoinPool.commonPool().getStealCount();
}
}
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public long getStealCount() {
return fjPool().getStealCount();
}
代码示例来源:origin: org.apidesign.bck2brwsr/emul
long st = getStealCount();
long qt = getQueuedTaskCount();
long qs = getQueuedSubmissionCount();
代码示例来源:origin: jtulach/bck2brwsr
long st = getStealCount();
long qt = getQueuedTaskCount();
long qs = getQueuedSubmissionCount();
代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166
long st = getStealCount();
long qt = getQueuedTaskCount();
long qs = getQueuedSubmissionCount();
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public ForkJoinInfo getInfo() {
final ForkJoinPool fjPool = fjPool();
int activeThreadCount = fjPool.getActiveThreadCount(); // Returns an estimate of the number of threads that are currently stealing or executing tasks.
int runningThreadCount = fjPool.getRunningThreadCount(); // Returns an estimate of the number of worker threads that are not blocked waiting to join tasks or for other managed synchronization.
int queuedSumbmissionCount = fjPool.getQueuedSubmissionCount(); // Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing.
long queuedTaskCount = fjPool.getQueuedTaskCount(); // Returns an estimate of the total number of tasks currently held in queues by worker threads (but not including tasks submitted to the pool that have not begun executing).
long stealCount = fjPool.getStealCount(); // Returns an estimate of the total number of tasks stolen from one thread's work queue by another.
return new ForkJoinInfo(activeThreadCount, runningThreadCount, queuedSumbmissionCount, queuedTaskCount, stealCount);
}
代码示例来源:origin: stackoverflow.com
long end = System.currentTimeMillis();
long currentSteals = fjp.getStealCount();
long newSteals = currentSteals - stealCount;
stealCount = currentSteals;
代码示例来源:origin: stackoverflow.com
long end = System.currentTimeMillis();
long currentSteals = fjp.getStealCount();
long newSteals = currentSteals - stealCount;
stealCount = currentSteals;
代码示例来源:origin: stackoverflow.com
" queuedSubmissions=" + pool.getQueuedSubmissionCount() +
" parallelism=" + pool.getParallelism() +
" stealCount=" + pool.getStealCount());
if (counter <= 0) return;
内容来源于网络,如有侵权,请联系作者删除!