1455 |
|
t.join(timeoutMillis); |
1456 |
|
} catch (InterruptedException fail) { |
1457 |
|
threadUnexpectedException(fail); |
1458 |
< |
} finally { |
1459 |
< |
if (t.getState() != Thread.State.TERMINATED) { |
1460 |
< |
t.interrupt(); |
1461 |
< |
threadFail("timed out waiting for thread to terminate"); |
1462 |
< |
} |
1458 |
> |
} |
1459 |
> |
Thread.State state; |
1460 |
> |
if ((state = t.getState()) != Thread.State.TERMINATED) { |
1461 |
> |
t.interrupt(); |
1462 |
> |
threadFail("timed out waiting for thread to terminate; " |
1463 |
> |
+ "state=" + state); |
1464 |
|
} |
1465 |
|
} |
1466 |
|
|