protected Set<Thread> getThreads() {
      Set<Thread> value = new HashSet<>();
      for (WeakReference<Thread> reference : directThreads) {
        Thread thread = reference.get();
        if (thread != null) {
          value.add(thread);
        }
      }
      return value;
    }
Modified version of {@code java.util.concurrent.Executors$DefaultThreadFactory} that uses
a {@code Set<WeakReference<Thread>>} to track the {@code Thread}s in the factory's
{@code ThreadGroup} excluding subgroups.
geode-junit/src/main/java/org/apache/geode/test/junit/rules/ExecutorServiceRule.java