mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
fix logic in Thread.join(long) (second try)
This commit is contained in:
parent
a064c744f4
commit
16537a32bc
@ -266,13 +266,10 @@ public class Thread implements Runnable {
|
||||
{
|
||||
long then = System.currentTimeMillis();
|
||||
long remaining = milliseconds;
|
||||
while (getState() != State.TERMINATED) {
|
||||
while (remaining > 0 && getState() != State.TERMINATED) {
|
||||
wait(remaining);
|
||||
|
||||
remaining = milliseconds - (System.currentTimeMillis() - then);
|
||||
if (remaining <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user