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

CR 7035020 fails to check shutdown

XMLWordPrintable

    • b140
    • generic
    • generic
    • Not verified

      From Doug:

      I finally had a chance to re-check last FJ change (CR 7035020)
      and saw that it could cause a shutdown check to be skipped.
      Now really fixed. (Again, the big lesson here is: don't make
      last-minute refactorings).


      *** ForkJoinPool.java 2011/04/01 20:20:33 1.61
      --- ForkJoinPool.java 2011/04/13 11:35:26 1.62
      ***************
      *** 795,801 ****
                    else if (w.eventCount != v)
                        return true; // update next time
                }
      ! if ((int)c != 0 && parallelism + (int)(nc >> AC_SHIFT) == 0 &&
                    blockedCount == 0 && quiescerCount == 0)
                    idleAwaitWork(w, nc, c, v); // quiescent
                for (boolean rescanned = false;;) {
      --- 795,802 ----
                    else if (w.eventCount != v)
                        return true; // update next time
                }
      ! if ((!shutdown || !tryTerminate(false)) &&
      ! (int)c != 0 && parallelism + (int)(nc >> AC_SHIFT) == 0 &&
                    blockedCount == 0 && quiescerCount == 0)
                    idleAwaitWork(w, nc, c, v); // quiescent
                for (boolean rescanned = false;;) {

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: