265 |
|
final boolean shutdownNow() { return transitionRunStateTo(TERMINATING); } |
266 |
|
|
267 |
|
/** |
268 |
< |
* Transitions to at least the given state. Returns true if not |
269 |
< |
* already at least at given state. |
268 |
> |
* Transitions to at least the given state. |
269 |
> |
* |
270 |
> |
* @return {@code true} if not already at least at given state |
271 |
|
*/ |
272 |
|
private boolean transitionRunStateTo(int state) { |
273 |
|
for (;;) { |
373 |
|
* {@code super.onTermination} at the end of the overridden method. |
374 |
|
* |
375 |
|
* @param exception the exception causing this thread to abort due |
376 |
< |
* to an unrecoverable error, or null if completed normally |
376 |
> |
* to an unrecoverable error, or {@code null} if completed normally |
377 |
|
*/ |
378 |
|
protected void onTermination(Throwable exception) { |
379 |
|
// Execute remaining local tasks unless aborting or terminating |
668 |
|
} |
669 |
|
|
670 |
|
/** |
671 |
< |
* Returns true if at least one worker in the given array appears |
672 |
< |
* to have at least one queued task. |
671 |
> |
* Returns {@code true} if at least one worker in the given array |
672 |
> |
* appears to have at least one queued task. |
673 |
|
* |
674 |
|
* @param ws array of workers |
675 |
|
*/ |