157 |
|
* links to try to find such a task. |
158 |
|
* |
159 |
|
* Compensating: Unless there are already enough live threads, |
160 |
< |
* method helpMaintainParallelism() may create or or |
160 |
> |
* method helpMaintainParallelism() may create or |
161 |
|
* re-activate a spare thread to compensate for blocked |
162 |
|
* joiners until they unblock. |
163 |
|
* |
318 |
|
* exactly #parallelism threads running, which is an impossible |
319 |
|
* task. We always need to create one when the number of running |
320 |
|
* threads would become zero and all workers are busy. Beyond |
321 |
< |
* this, we must rely on heuristics that work well in the the |
322 |
< |
* presence of transients phenomena such as GC stalls, dynamic |
321 |
> |
* this, we must rely on heuristics that work well in the |
322 |
> |
* presence of transient phenomena such as GC stalls, dynamic |
323 |
|
* compilation, and wake-up lags. These transients are extremely |
324 |
|
* common -- we are normally trying to fully saturate the CPUs on |
325 |
|
* a machine, so almost any activity other than running tasks |
985 |
|
w.lastEventCount = ec; // no need to wait |
986 |
|
break; |
987 |
|
} |
988 |
< |
else if (!(inactivate |= active)) |
988 |
> |
else if (!(inactivate |= active)) |
989 |
|
eventSync(w, wec); // must inactivate before sync |
990 |
|
} |
991 |
|
else |