1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
package jsr166y; |
331 |
|
*/ |
332 |
|
protected void onStart() { |
333 |
|
queue = new ForkJoinTask<?>[INITIAL_QUEUE_CAPACITY]; |
334 |
< |
int r = pool.workerSeedGenerator.nextInt(); |
335 |
< |
seed = (r == 0)? 1 : r; // must be nonzero |
334 |
> |
int r = ForkJoinPool.workerSeedGenerator.nextInt(); |
335 |
> |
seed = (r == 0) ? 1 : r; // must be nonzero |
336 |
|
} |
337 |
|
|
338 |
|
/** |
695 |
|
Thread.yield(); // for politeness |
696 |
|
} |
697 |
|
else |
698 |
< |
retries = helpJoinTask(joinMe)? MAX_HELP : retries - 1; |
698 |
> |
retries = helpJoinTask(joinMe) ? MAX_HELP : retries - 1; |
699 |
|
} |
700 |
|
else { |
701 |
|
retries = MAX_HELP; // restart if not done |
926 |
|
p.addActiveCount(1); |
927 |
|
} |
928 |
|
if ((t = (v != this) ? v.deqTask() : |
929 |
< |
locallyFifo? locallyDeqTask() : popTask()) != null) { |
929 |
> |
locallyFifo ? locallyDeqTask() : popTask()) != null) { |
930 |
|
currentSteal = t; |
931 |
|
t.doExec(); |
932 |
|
currentSteal = ps; |
955 |
|
int s; |
956 |
|
try { |
957 |
|
UNSAFE = getUnsafe(); |
958 |
< |
Class a = ForkJoinTask[].class; |
958 |
> |
Class<?> a = ForkJoinTask[].class; |
959 |
|
ABASE = UNSAFE.arrayBaseOffset(a); |
960 |
|
s = UNSAFE.arrayIndexScale(a); |
961 |
|
} catch (Exception e) { |