Files
rr3-apk/decompiled/sources/kotlinx/coroutines/internal/ConcurrentKt.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

35 lines
1.1 KiB
Java

package kotlinx.coroutines.internal;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledThreadPoolExecutor;
/* loaded from: classes5.dex */
public abstract class ConcurrentKt {
public static final Method REMOVE_FUTURE_ON_CANCEL;
static {
Method method;
try {
method = ScheduledThreadPoolExecutor.class.getMethod("setRemoveOnCancelPolicy", Boolean.TYPE);
} catch (Throwable unused) {
method = null;
}
REMOVE_FUTURE_ON_CANCEL = method;
}
public static final boolean removeFutureOnCancel(Executor executor) {
Method method;
try {
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = executor instanceof ScheduledThreadPoolExecutor ? (ScheduledThreadPoolExecutor) executor : null;
if (scheduledThreadPoolExecutor == null || (method = REMOVE_FUTURE_ON_CANCEL) == null) {
return false;
}
method.invoke(scheduledThreadPoolExecutor, Boolean.TRUE);
return true;
} catch (Throwable unused) {
return false;
}
}
}