1417 |
|
*/ |
1418 |
|
final String nextWorkerName() { |
1419 |
|
int n; |
1420 |
< |
do {} while(!U.compareAndSwapInt(this, NEXTWORKERNUMBER, |
1421 |
< |
n = nextWorkerNumber, ++n)); |
1420 |
> |
do {} while (!U.compareAndSwapInt(this, NEXTWORKERNUMBER, |
1421 |
> |
n = nextWorkerNumber, ++n)); |
1422 |
|
return workerNamePrefix.concat(Integer.toString(n)); |
1423 |
|
} |
1424 |
|
|
1481 |
|
if (wt != null && (w = wt.workQueue) != null) { |
1482 |
|
w.runState = -1; // ensure runState is set |
1483 |
|
long steals = w.totalSteals + w.nsteals, sc; |
1484 |
< |
do {} while(!U.compareAndSwapLong(this, STEALCOUNT, |
1485 |
< |
sc = stealCount, sc + steals)); |
1484 |
> |
do {} while (!U.compareAndSwapLong(this, STEALCOUNT, |
1485 |
> |
sc = stealCount, sc + steals)); |
1486 |
|
int idx = w.poolIndex; |
1487 |
|
while (!U.compareAndSwapInt(this, MAINLOCK, 0, 1)) |
1488 |
|
tryAwaitMainLock(); |
2275 |
|
for (long c;;) { |
2276 |
|
if (((c = ctl) & STOP_BIT) != 0) { // already terminating |
2277 |
|
if ((short)(c >>> TC_SHIFT) == -parallelism) { |
2278 |
< |
synchronized(this) { |
2278 |
> |
synchronized (this) { |
2279 |
|
notifyAll(); // signal when 0 workers |
2280 |
|
} |
2281 |
|
} |
2999 |
|
return true; |
3000 |
|
long startTime = System.nanoTime(); |
3001 |
|
boolean terminated = false; |
3002 |
< |
synchronized(this) { |
3002 |
> |
synchronized (this) { |
3003 |
|
for (long waitTime = nanos, millis = 0L;;) { |
3004 |
|
if (terminated = isTerminated() || |
3005 |
|
waitTime <= 0L || |
3184 |
|
defaultForkJoinWorkerThreadFactory : |
3185 |
|
((ForkJoinWorkerThreadFactory)ClassLoader. |
3186 |
|
getSystemClassLoader().loadClass(fp).newInstance()); |
3187 |
< |
Thread.UncaughtExceptionHandler ueh = (up == null)? null : |
3187 |
> |
Thread.UncaughtExceptionHandler ueh = (up == null) ? null : |
3188 |
|
((Thread.UncaughtExceptionHandler)ClassLoader. |
3189 |
|
getSystemClassLoader().loadClass(up).newInstance()); |
3190 |
|
int par; |