code: public @Nonnull SetType where(ProcessThread.Predicate pred) {
          HashSet<ThreadType> subset = new HashSet<ThreadType>(size() / 2);
          for (ThreadType thread: threads) {
              if (pred.isValid(thread)) subset.add(thread);
          }
  
          return runtime.getThreadSet(subset);
      }
docs: Get subset of current threads.
  
  @param pred Predicate to match.
  @return {@link ThreadSet} scoped to current runtime containing subset of threads that match the predicate.