1128 |
|
// Finish now if all threads terminated; else in some subsequent call |
1129 |
|
if ((workerCounts >>> TOTAL_COUNT_SHIFT) == 0) { |
1130 |
|
advanceRunLevel(TERMINATED); |
1131 |
< |
termination.arrive(); |
1131 |
> |
termination.forceTermination(); |
1132 |
|
} |
1133 |
|
return true; |
1134 |
|
} |
1796 |
|
public boolean awaitTermination(long timeout, TimeUnit unit) |
1797 |
|
throws InterruptedException { |
1798 |
|
try { |
1799 |
< |
return termination.awaitAdvanceInterruptibly(0, timeout, unit) > 0; |
1799 |
> |
termination.awaitAdvanceInterruptibly(0, timeout, unit); |
1800 |
|
} catch (TimeoutException ex) { |
1801 |
|
return false; |
1802 |
|
} |
1803 |
+ |
return true; |
1804 |
|
} |
1805 |
|
|
1806 |
|
/** |