Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001566 Concurrency updates (jsr166e) - JEP 155
  3. JDK-8008378

FJP.commonPool creation within PrivilegedAction, support parallelism 0, add awaitQuiescence

    Details

      Description

      1. Access and parse properties, as well as construct common pool in a PrivilegedAction, explicitly ignoring
      any unparseable settings. This way any racy static creation by unprivileged clients rather than usual channels won't fail, while at the same time allowing better advice about managed construction (as in EE frameworks) to do anything that causes it to exist before starting other processing, as well as to, if applicable provide a thread-factory that itself uses PrivilegedAction or some such. This way, these frameworks remain in control over how much parallelism their users get.

      2. For *only* the particular method FJP.execute(Runnable) (which is not usually used in FJ but must be supported), force an exception thrown by the Runnable to cause the corresponding worker to die (and possibly be replaced). This is among other things a small abuse guard: The normal FJ capture and reporting of an exception in the task object will never be seen, so at least the UncaughtExceptionHandler will trigger, at the cost of throwing away and creating a thread (that we normally otherwise avoid).

      3. Add awaitQuiescence. Any program that relies on asynchronous task processing to complete before program termination should invoke commonPool().awaitQuiescence, before exit.

        Activity

        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f08ad5938709
        User: chegar
        Date: 2013-03-02 08:56:58 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f08ad5938709 User: chegar Date: 2013-03-02 08:56:58 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/f08ad5938709
        User: lana
        Date: 2013-03-15 17:04:08 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/f08ad5938709 User: lana Date: 2013-03-15 17:04:08 +0000
        Hide
        ewang Eric Wang (Inactive) added a comment -
        SQE has looked at the bug and decided no additional tests are needed.
        Show
        ewang Eric Wang (Inactive) added a comment - SQE has looked at the bug and decided no additional tests are needed.

          People

          • Assignee:
            chegar Chris Hegarty
            Reporter:
            chegar Chris Hegarty
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: