private static boolean recurseOn(ThreadGroup threadGroup, int depth) {
		final int activeCount = threadGroup.activeCount();
		Thread[] threads = new Thread[activeCount * FUDGE_FACTOR];
		final int actualNumberOfThreads = threadGroup.enumerate(threads, false);

		for (int ii = 0; ii < actualNumberOfThreads; ++ii) {
			if (threads[ii].getName().startsWith("AWT-")) {
				return true;
			}
		}

		final int activeGroupCount = threadGroup.activeGroupCount();
		ThreadGroup[] threadGroups = new ThreadGroup[activeGroupCount * FUDGE_FACTOR];
		final int actualNumberOfThreadGroups = threadGroup.enumerate(threadGroups, false);

		for (int ii = 0; ii < actualNumberOfThreadGroups; ++ii) {
			boolean recursedValue = recurseOn(threadGroups[ii], depth + 1);
			if (recursedValue) {
				return true;
			}
		}

		return false;
	}
How many times larger should the arrays be to accommodate growing numbers
of threads or thread groups?
Ghidra/Features/GhidraServer/src/test.slow/java/ghidra/server/remote/ThreadUtils.java