HADOOP-14214. DomainSocketWatcher::add()/delete() should not self interrupt while looping await(). Contributed by Mingliang Liu
(cherry picked from commit d35e79abc2
)
This commit is contained in:
parent
62b8665726
commit
1e64c582f5
|
@ -321,11 +321,7 @@ public final class DomainSocketWatcher implements Closeable {
|
|||
toAdd.add(entry);
|
||||
kick();
|
||||
while (true) {
|
||||
try {
|
||||
processedCond.await();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
processedCond.awaitUninterruptibly();
|
||||
if (!toAdd.contains(entry)) {
|
||||
break;
|
||||
}
|
||||
|
@ -347,11 +343,7 @@ public final class DomainSocketWatcher implements Closeable {
|
|||
toRemove.put(sock.fd, sock);
|
||||
kick();
|
||||
while (true) {
|
||||
try {
|
||||
processedCond.await();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
processedCond.awaitUninterruptibly();
|
||||
if (!toRemove.containsKey(sock.fd)) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue