本文整理了Java中java.util.concurrent.ForkJoinPool.tryCompensate()
方法的一些代码示例,展示了ForkJoinPool.tryCompensate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ForkJoinPool.tryCompensate()
方法的具体详情如下:
包路径:java.util.concurrent.ForkJoinPool
类名称:ForkJoinPool
方法名:tryCompensate
[英]Tries to decrement active count (sometimes implicitly) and possibly release or create a compensating worker in preparation for blocking. Fails on contention or termination. Otherwise, adds a new thread if no idle workers are available and pool may become starved.
[中]尝试减少活动计数(有时是隐式的),并可能释放或创建一个补偿工作进程以准备阻塞。争用或终止时失败。否则,如果没有可用的空闲工作线程,则会添加一个新线程,并且池可能会变得不足。
代码示例来源:origin: robovm/robovm
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: robovm/robovm
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: robovm/robovm
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: ibinti/bugvm
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: com.gluonhq/robovm-rt
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: MobiVM/robovm
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: com.bugvm/bugvm-rt
cancelIgnoringExceptions(this);
else if (!canBlock) {
if (p == null || p.tryCompensate())
canBlock = true;
代码示例来源:origin: com.gluonhq/robovm-rt
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: MobiVM/robovm
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: ibinti/bugvm
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: com.bugvm/bugvm-rt
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: FlexoVM/flexovm
(s = task.status) >= 0) {
helpSignal(task, joiner.poolIndex);
if ((s = task.status) >= 0 && tryCompensate()) {
if (task.trySetSignal() && (s = task.status) >= 0) {
synchronized (task) {
代码示例来源:origin: com.bugvm/bugvm-rt
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: MobiVM/robovm
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: ibinti/bugvm
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: com.gluonhq/robovm-rt
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
代码示例来源:origin: FlexoVM/flexovm
if (p.tryCompensate()) {
try {
do {} while (!blocker.isReleasable() &&
内容来源于网络,如有侵权,请联系作者删除!