Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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