Skip to content

HttpRequest#executeAsync() may throw a RejectedExecutionException #372

Closed

Description

@sotodel

As described in the question and answer in this Stack Overflow post and this JDK issue, the ExecutorService returned by Executors.newSingleThreadExecutor can be finalized and shut down while still in use.

This may cause a RejectedExecutionException to be thrown while HttpRequest#executeAsync(Executor) is submitting its task.

I suggest changing HttpRequest#executeAsync() to use an ExecutorService returned by Executors#newFixedThreadPool(1), which isn't wrapped in a FinalizableDelegatingExecutorService.

Activity

  1. added
    type: bug
    priority: p2
    on Jan 8, 2018
  2. added
    🚨
    on Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨priority: p2type: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions