/** * Gets and removes a local task. * * @return a task, if available */ final ForkJoinTask<?> pollLocalTask() { return locallyFifo ? locallyDeqTask() : popTask(); }
/** * Runs the given task, plus any local tasks until queue is empty */ final void execTask(ForkJoinTask<?> t) { currentSteal = t; for (;;) { if (t != null) t.doExec(); if (queueTop == queueBase) break; t = locallyFifo ? locallyDeqTask() : popTask(); } ++stealCount; currentSteal = null; }
locallyFifo ? locallyDeqTask() : popTask()) != null) { currentSteal = t; t.doExec();