awaitility/src/main/java/org/awaitility/core/ConditionFactory.java
public ConditionFactory pollExecutorService(ExecutorService executorService) {
        if (executorService != null && executorService instanceof ScheduledExecutorService) {
            throw new IllegalArgumentException("Poll executor service cannot be an instance of " + ScheduledExecutorService.class.getName());
        }
        return new ConditionFactory(alias, timeoutConstraint, pollInterval, pollDelay, false,
                exceptionsIgnorer, conditionEvaluationListener, ExecutorLifecycle.withoutCleanup(executorService));
    }
public ConditionFactory pollExecutorService(ExecutorService executorService) {
        if (executorService != null && executorService instanceof ScheduledExecutorService) {
            throw new IllegalArgumentException("Poll executor service cannot be an instance of " + ScheduledExecutorService.class.getName());
        }
        return new ConditionFactory(alias, timeoutConstraint, pollInterval, pollDelay, false,
                exceptionsIgnorer, conditionEvaluationListener, ExecutorLifecycle.withoutCleanup(executorService));
    }
Specify the executor service whose threads will be used to evaluate the poll condition in Awaitility.
Note that the executor service must be shutdown manually!

This is an advanced feature and it should only be used sparingly.

@param executorService The executor service that Awaitility will use when polling condition evaluations
@return the condition factory