void () { int newDeprioritizations = changePrioritizing(()->myDeprioritizations.incrementAndGet()); if (newDeprioritizations == 100 + ForkJoinPool.getCommonPoolParallelism() * 2) { Attachment attachment = new Attachment("threadDump.txt", ThreadDumper.dumpThreadsToString()); attachment.setIncluded(true); LOG.error("A suspiciously high nesting of suppressPrioritizing, forgot to call restorePrioritizing?", attachment); } }