private int checkForStuckThreads(Collection<AbstractExecutor> executors, long currentTime,
      StuckAction action) {
    int result = 0;
    for (AbstractExecutor executor : executors) {
      if (executor.isMonitoringSuspended()) {
        continue;
      }
      final long startTime = executor.getStartTime();
      if (startTime == 0) {
        executor.setStartTime(currentTime);
        continue;
      }
      long delta = currentTime - startTime;
      if (delta >= timeLimitMillis) {
        action.run(executor, delta);
        result++;
      }
    }
    return result;
  }
Iterate over "executors" calling "action" on each one that is stuck.

@return the number of times action was called
geode-core/src/main/java/org/apache/geode/internal/monitoring/ThreadsMonitoringProcess.java