You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the killThread method, instead of ignoring the InterruptedException, should it restore the interrupted status using Thread.currentThread().interrupt()?
I am using a threadpool to run multiple webClient instance, the interrupted status is needed to perform some action. The current version seems to swallow the thread interruption status.
@SuppressWarnings("deprecation")
private void killThread() {
...
try {
eventLoopThread_.interrupt();
eventLoopThread_.join(10_000);
}
catch (final InterruptedException e) {
LOG.warn("InterruptedException while waiting for the eventLoop thread to join ", e);
// ignore, this doesn't matter, we want to stop it
}
...
}