本文整理了Java中java.util.concurrent.ForkJoinPool.findNonEmptyStealQueue()
方法的一些代码示例,展示了ForkJoinPool.findNonEmptyStealQueue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ForkJoinPool.findNonEmptyStealQueue()
方法的具体详情如下:
包路径:java.util.concurrent.ForkJoinPool
类名称:ForkJoinPool
方法名:findNonEmptyStealQueue
[英]Returns a (probably) non-empty steal queue, if one is found during a random, then cyclic scan, else null. This method must be retried by caller if, by the time it tries to use the queue, it is empty.
[中]
代码示例来源:origin: robovm/robovm
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: robovm/robovm
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: robovm/robovm
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
代码示例来源:origin: MobiVM/robovm
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: ibinti/bugvm
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Restricted version of helpQuiescePool for external callers
*/
static void externalHelpQuiescePool() {
ForkJoinPool p; ForkJoinTask<?> t; WorkQueue q; int b;
if ((p = commonPool) != null &&
(q = p.findNonEmptyStealQueue(1)) != null &&
(b = q.base) - q.top < 0 &&
(t = q.pollAt(b)) != null)
t.doExec();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Gets and removes a local or stolen task for the given worker.
*
* @return a task, if available
*/
final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q; int b;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue(w.nextSeed())) == null)
return null;
if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
return t;
}
}
代码示例来源:origin: MobiVM/robovm
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
代码示例来源:origin: ibinti/bugvm
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
代码示例来源:origin: com.gluonhq/robovm-rt
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
代码示例来源:origin: com.bugvm/bugvm-rt
localTask.doExec();
WorkQueue q = findNonEmptyStealQueue(w.nextSeed());
if (q != null) {
ForkJoinTask<?> t; int b;
内容来源于网络,如有侵权,请联系作者删除!