boolean (@NotNull Thread thread, StackTraceElement @NotNull [] stackTrace) { if (!"kotlinx.coroutines.scheduling.CoroutineScheduler$Worker".equals(thread.getClass().getName())) { return false; } //noinspection UnnecessaryLocalVariable boolean insideCpuWorkerIdle = ContainerUtil.exists( stackTrace, element -> element.getMethodName().equals("park") && element.getClassName().equals("kotlinx.coroutines.scheduling.CoroutineScheduler$Worker") ); return insideCpuWorkerIdle; }