Skip to content

Restore the interrupted status for javascript.background.DefaultJavaScriptExecutor.killThread #609

@guang-hou

Description

@guang-hou

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
       }
       ...
   }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions