Make shutdown InterruptedExceptions not noisy

This commit is contained in:
Mike Primm 2022-02-16 00:50:53 -06:00
parent 6b6b01ccb7
commit d1d97d986a

View file

@ -228,10 +228,12 @@ public class MapManager {
try {
r.run();
} catch (Exception x) {
if (!(x instanceof InterruptedException)) { // Avoid shutdown noise
Log.severe("Exception during render job: " + r);
x.printStackTrace();
}
}
}
});
} catch (RejectedExecutionException rxe) { /* Pool shutdown - nominal for reload or unload */
}
@ -244,10 +246,12 @@ public class MapManager {
try {
command.run();
} catch (Exception x) {
if (!(x instanceof InterruptedException)) { // Avoid shutdown noise
Log.severe("Exception during render job: " + command);
x.printStackTrace();
}
}
}
}, delay, unit);
} catch (RejectedExecutionException rxe) {
return null; /* Pool shut down when we reload or unload */