666 |
|
final ReentrantLock runLock = this.runLock; |
667 |
|
runLock.lock(); |
668 |
|
try { |
669 |
< |
Thread.interrupted(); // clear interrupt status on entry |
670 |
< |
// Abort now if immediate cancel. Otherwise, we have |
671 |
< |
// committed to run this task. |
672 |
< |
if (runState == STOP) |
673 |
< |
return; |
674 |
< |
|
669 |
> |
// If not shutting down then clear an outstanding interrupt. |
670 |
> |
if (runState != STOP && |
671 |
> |
Thread.interrupted() && |
672 |
> |
runState == STOP) // Re-interrupt if stopped after clearing |
673 |
> |
thread.interrupt(); |
674 |
|
boolean ran = false; |
675 |
|
beforeExecute(thread, task); |
676 |
|
try { |