jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
changeset 30036 3d4eb4503c18
parent 26448 5853628b0e63
child 30681 4a3c81f6f384
equal deleted inserted replaced
30035:b83ec0c9fd74 30036:3d4eb4503c18
  2409             if ((a = q.array) != null &&
  2409             if ((a = q.array) != null &&
  2410                 (am = a.length - 1) > (n = (s = q.top) - q.base)) {
  2410                 (am = a.length - 1) > (n = (s = q.top) - q.base)) {
  2411                 int j = ((am & s) << ASHIFT) + ABASE;
  2411                 int j = ((am & s) << ASHIFT) + ABASE;
  2412                 U.putOrderedObject(a, j, task);
  2412                 U.putOrderedObject(a, j, task);
  2413                 U.putOrderedInt(q, QTOP, s + 1);
  2413                 U.putOrderedInt(q, QTOP, s + 1);
  2414                 U.putOrderedInt(q, QLOCK, 0);
  2414                 U.putIntVolatile(q, QLOCK, 0);
  2415                 if (n <= 1)
  2415                 if (n <= 1)
  2416                     signalWork(ws, q);
  2416                     signalWork(ws, q);
  2417                 return;
  2417                 return;
  2418             }
  2418             }
  2419             U.compareAndSwapInt(q, QLOCK, 1, 0);
  2419             U.compareAndSwapInt(q, QLOCK, 1, 0);