本文整理了Java中java.util.concurrent.ForkJoinPool.helpComplete()
方法的一些代码示例,展示了ForkJoinPool.helpComplete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ForkJoinPool.helpComplete()
方法的具体详情如下:
包路径:java.util.concurrent.ForkJoinPool
类名称:ForkJoinPool
方法名:helpComplete
[英]Analog of tryHelpStealer for CountedCompleters. Tries to steal and run tasks within the target's computation.
[中]用于计数完成器的tryHelpStealer模拟。尝试在目标计算中窃取并运行任务。
代码示例来源:origin: robovm/robovm
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: robovm/robovm
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: robovm/robovm
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: MobiVM/robovm
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: ibinti/bugvm
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: com.gluonhq/robovm-rt
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: com.bugvm/bugvm-rt
helpSignal(root, q.poolIndex);
if (root.status >= 0)
helpComplete(root, SHARED_QUEUE);
break;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: MobiVM/robovm
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: com.bugvm/bugvm-rt
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: ibinti/bugvm
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: FlexoVM/flexovm
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: com.gluonhq/robovm-rt
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
代码示例来源:origin: MobiVM/robovm
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Stripped-down variant of awaitJoin used by timed joins. Tries
* to help join only while there is continuous progress. (Caller
* will then enter a timed wait.)
*
* @param joiner the joining worker
* @param task the task
*/
final void helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) {
int s;
if (joiner != null && task != null && (s = task.status) >= 0) {
ForkJoinTask<?> prevJoin = joiner.currentJoin;
joiner.currentJoin = task;
do {} while ((s = task.status) >= 0 && !joiner.isEmpty() &&
joiner.tryRemoveAndExec(task));
if (s >= 0 && (s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 &&
(task instanceof CountedCompleter))
s = helpComplete(task, LIFO_QUEUE);
}
if (s >= 0 && joiner.isEmpty()) {
do {} while (task.status >= 0 &&
tryHelpStealer(joiner, task) > 0);
}
joiner.currentJoin = prevJoin;
}
}
内容来源于网络,如有侵权,请联系作者删除!