Because this method is not timed, tasks can run on the current thread if maxPolicy=loose or a permit is available.
481424
@FFDCIgnore(value = { RejectedExecutionException.class })
    @Override
    public <T> List<PolicyTaskFuture<T>> invokeAll(Collection<? extends Callable<T>> tasks, PolicyTaskCallback[] callbacks) throws InterruptedException {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        // Determine if we need a permit to run one or more of the tasks on the current thread, and if so, acquire it,
        int taskCount = tasks.size();
        boolean havePermit = false;
        boolean useCurrentThread = maxPolicy == MaxPolicy.loose || (havePermit = taskCount > 0 && maxConcurrencyConstraint.tryAcquire());

        List<PolicyTaskFutureImpl<T>> futures = new ArrayList<PolicyTaskFutureImpl<T>>(taskCount);
        try {
            // create futures in advance, which gives the callback an opportunity to reject
            int t = 0;
            for (Callable<T> task : tasks) {
                PolicyTaskCallback callback = callbacks == null ? null : callbacks[t++];
                PolicyExecutorImpl executor = callback == null ? this : (PolicyExecutorImpl) callback.getExecutor(this);
                long startTimeoutNS = callback == null ? startTimeout : callback.getStartTimeout(executor.startTimeout);
                futures.add(new PolicyTaskFutureImpl<T>(executor, task, callback, startTimeoutNS));
            }

            // enqueue tasks (except the last if we are able to run tasks on the current thread)
            int numToSubmitAsync = useCurrentThread ? taskCount - 1 : taskCount;
            t = 0;
            for (PolicyTaskFutureImpl<T> taskFuture : futures)
                if (t++ < numToSubmitAsync || taskFuture.executor != this) {
                    boolean enqueued;
                    if (useCurrentThread && taskFuture.executor == this)
                        enqueued = taskFuture.executor.enqueue(taskFuture, 0, true);
                    else
                        enqueued = taskFuture.executor.enqueue(taskFuture, taskFuture.executor.maxWaitForEnqueueNS.get(), null);

                    if (!enqueued) // must immediately return if ran on current thread and was interrupted
                        taskFuture.throwIfInterrupted();
                } else {
                    taskFuture.accept(true);
                }

            // run on current thread (by current executor) if possible
            if (useCurrentThread)
                for (t = numToSubmitAsync; t >= 0; t--) {
                    PolicyTaskFutureImpl<T> taskFuture = futures.get(t);
                    State currentState = taskFuture.executor.state.get();
                    if (taskFuture.executor == this && t == numToSubmitAsync) { // we intentionally avoided submitting the last task
                        if (currentState != State.ACTIVE)
                            throw new RejectedExecutionException(Tr.formatMessage(tc, "CWWKE1202.submit.after.shutdown", taskFuture.getIdentifier()));
                    } else if (taskFuture.executor == this && !taskFuture.isDone() && currentState.canStartTask && queue.remove(taskFuture)) {
                        maxQueueSizeConstraint.release();
                        taskFuture.nsQueueEnd = System.nanoTime();
                    } else {
                        if (trace && tc.isDebugEnabled())
                            Tr.debug(this, tc, "no longer in queue, or this executor is unable to run it", taskFuture);
                        continue; // other thread could already be processing the task, or it could be cancelled
                    }

                    if (taskFuture.nsStartBy == taskFuture.nsAcceptBegin - 1 // never times out, or
                        || taskFuture.nsStartBy - taskFuture.nsQueueEnd > 0) // have time remaining
                        runTask(taskFuture);
                    else { // timed out
                        taskFuture.nsRunEnd = taskFuture.nsQueueEnd;
                        RejectedExecutionException x = new RejectedExecutionException(new StartTimeoutException( //
                                        taskFuture.getIdentifier(), taskFuture.getTaskName(), //
                                        taskFuture.nsQueueEnd - taskFuture.nsAcceptBegin, //
                                        taskFuture.nsStartBy - taskFuture.nsAcceptBegin));
                        taskFuture.abort(false, x);
                        throw x;
                    }

                    // must immediately return if current thread is interrupted
                    taskFuture.throwIfInterrupted();
                }

            // wait for completion
            for (PolicyTaskFutureImpl<T> future : futures) {
                future.await();
                taskCount--;
            }
        } catch (RejectedExecutionException x) {
            if (trace && tc.isDebugEnabled())
                Tr.debug(this, tc, "rejected", x);
            if (x.getCause() instanceof InterruptedException)
                throw (InterruptedException) x.getCause();
            else
                throw x;
        } finally {
            if (havePermit)
                transferOrReleasePermit();

            if (taskCount != 0)
                for (Future<T> f : futures)
                    f.cancel(true);
        }

        @SuppressWarnings({ "rawtypes", "unchecked" })
        List<PolicyTaskFuture<T>> list = (List) futures;
        return list;
    }
1040906
private void queueProcessable(final IEngineProcessable processableModel) {

        ensurePendingCapacity();

        final TemplateFlowController controller = this.flowController;

        this.pendingProcessings[this.pendingProcessingsSize] = processableModel;
        this.pendingProcessingsSize++;

        if (controller.stopProcessing) {
            controller.processorTemplateHandlerPending = true;
            return;
        }

        final boolean processed = this.pendingProcessings[this.pendingProcessingsSize - 1].process();
        if (!processed) {
            controller.processorTemplateHandlerPending = true;
            return;
        }
        this.pendingProcessingsSize--;

        controller.processorTemplateHandlerPending = false;

    }
681234
private boolean synchronizedRequestPermissionToExecute() {
        boolean result = false;
        synchronized (this) {
            switch (state.get()) {
                case CLOSED:
                    result = true;
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Allowing execution in closed state");
                    }
                    break;
                case HALF_OPEN:
                    // Limit the number of concurrent executions when we're half-open
                    if (halfOpenRunningExecutions < policy.getSuccessThreshold()) {
                        halfOpenRunningExecutions++;
                        halfOpenLastExecutionStarted = System.nanoTime();
                        result = true;
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Allowing execution in half-open state. Now running ({0}/{1})", halfOpenRunningExecutions, policy.getSuccessThreshold());
                        }
                    } else {
                        // If the user runs an operation which never returns (possible using CompletionStage), we might end up stuck in half-open state
                        // denying all executions forever. For this reason, if we stay in half-open state for longer than the open state delay time,
                        // allow another execution
                        if (System.nanoTime() - halfOpenLastExecutionStarted > policyDelayNanos) {
                            halfOpenLastExecutionStarted = System.nanoTime();
                            result = true;
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                Tr.debug(tc, "Allowing execution in half-open state because enough time has passed without a trial executions completing");
                            }
                        } else {
                            result = false;
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                Tr.debug(tc, "Denying execution in half-open state, trial execution limit reached");
                            }
                        }
                    }
                    break;
                case OPEN:
                    if (System.nanoTime() - openStateStartTime > policyDelayNanos) {
                        // We've been in open state for long enough, transition to half-open
                        stateHalfOpen();
                        halfOpenRunningExecutions++;
                        halfOpenLastExecutionStarted = System.nanoTime();
                        result = true;
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Allowing execution because we just changed to half-open state");
                        }
                    } else {
                        result = false;
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Denying execution in open state");
                        }
                    }
                    break;
            }
        }
        return result;
    }
342014
public boolean schedulePolling() {
        if(isDisabled())    return false;
        SCMTrigger scmt = getTrigger(SCMTrigger.class);
        if(scmt==null)      return false;
        scmt.run();
        return true;
    }
147314
public static boolean isRunnable(Method method, String[] filters) {
		// Get the ROX annotations
		RoxableTest mAnnotation = method.getAnnotation(RoxableTest.class);
		RoxableTestClass cAnnotation = method.getDeclaringClass().getAnnotation(RoxableTestClass.class);

		if (mAnnotation != null || cAnnotation != null) {
			return isRunnable(new FilterTargetData(method, mAnnotation, cAnnotation), filters);
		}		

		return true;
	}
865573
public static void call(Runnable task) {
        try {
            call(() -> {
                task.run();
                return true;
            });
        } catch (Exception e) {
            // It's safe to throw unsafely here because the Callable we passed never throws a checked exception.
            Exceptions.throwUnsafely(e);
        }
    }
834587
public LatchedLazyFuture<X> withRunningThread() {
        if (state.get() == DONE) return this;
        if (state.compareAndSet(null, STARTED)) {
            Thread thread = new Thread(this.getClass().getName() + ".withRunningThread") {
                @Override
                public void run() {
                    try {
                        internalCalc();
                    } catch (ExecutionException | InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            };
            thread.start();

            return this;
        } else {
            return this;
        }
    }
867471
def can_be_executed_by(self, thread_id):
        '''
        '''
        return self.thread_id == thread_id or self.thread_id.endswith('|' + thread_id)
956278
public static void finishThread(){
    //--Create Task
    final long threadId = Thread.currentThread().getId();
    Runnable finish = new Runnable(){
      public void run(){
        releaseThreadControl(threadId);
      }
    };
    //--Run Task
    if(isThreaded){
      //(case: multithreaded)
      attemptThreadControl( threadId, finish );
    } else {
      //(case: no threading)
      throw new IllegalStateException("finishThreads() called outside of threaded environment");
    }
  }
387537
private <T> Optional<T> tryWithLock(Supplier<T> task)
    {
        return tryWithLock(0, TimeUnit.MILLISECONDS, task);
    }
971428
function isLockHolder(task, requestorId) {
  if(!task.semaphore) {
    throw new LockError('TaskNotLocked');
  }
  var requestKey  = hashKey(requestorId, task.id);

  return requestKey === task.semaphore.key;
}
214622
public void executeWithDelay() {
        long now = Clock.currentTimeMillis();
        if (delay + now > hardLimit) {
            scheduleNewExecution(now);
        } else if (!tryPostponeExecution()) {
            scheduleNewExecution(now);
        }
    }
1232603
public RetryInterceptorBuilder<T> maxAttempts(int maxAttempts) {
		Assert.isNull(this.retryOperations,
				"cannot alter the retry policy when a custom retryOperations has been set");
		Assert.isTrue(!this.retryPolicySet,
				"cannot alter the retry policy when a custom retryPolicy has been set");
		this.simpleRetryPolicy.setMaxAttempts(maxAttempts);
		this.retryTemplate.setRetryPolicy(this.simpleRetryPolicy);
		this.templateAltered = true;
		return this;
	}
627252
def _run(cls):
        """"""
        if cls._thread:
            with cls._lock:
                # First run: execute each task once to get it started
                for task in cls.tasks:
                    cls._execute_task(task)
                cls.tasks.sort()
                cls._last_execution = time.time()

        while cls._thread:
            with cls._lock:
                if cls.tasks:
                    for task in cls.tasks:
                        if task.next_execution - cls._last_execution < 0.5:
                            cls._execute_task(task)
                        else:
                            break
                    cls.tasks.sort()
                    cls._last_execution = time.time()
                    cls._sleep_delay = cls.tasks[0].next_execution - cls._last_execution

                else:
                    cls._sleep_delay = 1

                sleep_delay = max(0.1, cls._sleep_delay)

            # Don't hold cls._lock while sleeping, sleep delay should be 1 second when no tasks are present
            time.sleep(sleep_delay)
470767
@GuardedBy("evictionLock")
    void runTasks(Task[] tasks, int maxTaskIndex) {
        for (int i = 0; i <= maxTaskIndex; i++) {
            runTasksInChain(tasks[i]);
        }
    }
1342140
public boolean isPolicyExceeded() {
    boolean withinMaxRetries = maxAttempts == -1 || attemptCount < maxAttempts;
    boolean withinMaxDuration = maxDuration == -1 || System.nanoTime() - startTime < maxDuration;
    return !withinMaxRetries || !withinMaxDuration;
  }
570852
public void callWithTimeout(String description, int timeout, Runnable task) {
        Future<?> callFuture = threadPool.submit(task);
        getWithTimeout(callFuture, timeout, description);
    }