code: final int awaitJoin(WorkQueue joiner, ForkJoinTask<?> task) {
          int s;
          if ((s = task.status) >= 0) {
              ForkJoinTask<?> prevJoin = joiner.currentJoin;
              joiner.currentJoin = task;
              long startTime = 0L;
              for (int k = 0;;) {
                  if ((s = (joiner.isEmpty() ?           // try to help
                            tryHelpStealer(joiner, task) :
                            joiner.tryRemoveAndExec(task))) == 0 &&
                      (s = task.status) >= 0) {
                      if (k == 0) {
                          startTime = System.nanoTime();
                          tryPollForAndExec(joiner, task); // check uncommon case
                      }
                      else if ((k & (MAX_HELP - 1)) == 0 &&
                               System.nanoTime() - startTime >=
                               COMPENSATION_DELAY &&
                               tryCompensate(task, null)) {
                          if (task.trySetSignal()) {
                              synchronized (task) {
                                  if (task.status >= 0) {
                                      try {                // see ForkJoinTask
                                          task.wait();     //  for explanation
                                      } catch (InterruptedException ie) {
                                      }
                                  }
                                  else
                                      task.notifyAll();
                              }
                          }
                          long c;                          // re-activate
                          do {} while (!U.compareAndSwapLong
                                       (this, CTL, c = ctl, c + AC_UNIT));
                      }
                  }
                  if (s < 0 || (s = task.status) < 0) {
                      joiner.currentJoin = prevJoin;
                      break;
                  }
                  else if ((k++ & (MAX_HELP - 1)) == MAX_HELP >>> 1)
                      Thread.yield();                     // for politeness
              }
          }
          return s;
      }
docs: Helps and/or blocks until the given task is done.
  
  @param joiner the joining worker
  @param task the task
  @return task status on exit