// Wait for removal to complete
while (map.containsKey(name)) try {
map.wait();
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new CancellationException("Service install was cancelled");
}
boolean intr = false;
try {
while (map.containsKey(name)) try {
map.wait();
return realBuilder.install();
} catch (InterruptedException e) {
if (respectInterruption) {
Thread.currentThread().interrupt();
throw new CancellationException("Service install was cancelled");
} else {
intr = true;
}
}
} finally {