Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8204339

HTTP Client Dependent tasks should run in the common pool

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • None
    • 11
    • core-libs

    Description

      Currently dependent tasks are specified, where practical, to run in the HTTP Client executor. This is not the best idea, since synchronous dependent tasks could block, or cause several other long running tasks, or chains of tasks, to execute. Also, the defaultExecutor of CF's returned is still the same as CompletableFuture.defaultExecutor, which is mostly the common pool. It is a cleaner and easier model to have the HTTP Client set up execution of synchronous dependent tasks in the CF.defaultExecutor, which is more familiar to developers, and easier to understand. This also reduces the likelihood of the HTTP Client being starved of threads to execute its tasks.

      This is just default behaviour, both the HTTP Client and CompletableFuture allow more fine-grain control, if needed.

      Attachments

        Issue Links

          Activity

            People

              chegar Chris Hegarty
              chegar Chris Hegarty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: