40 lines
1.9 KiB
Java
40 lines
1.9 KiB
Java
package com.discord.utilities.networking;
|
|
|
|
import com.discord.utilities.logging.Logger;
|
|
import com.discord.utilities.logging.LoggingProvider;
|
|
import com.discord.utilities.networking.Backoff;
|
|
import java.util.TimerTask;
|
|
import java.util.concurrent.ExecutorService;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: Backoff.kt */
|
|
public final class Backoff$TimerScheduler$schedule$1 extends TimerTask {
|
|
public final /* synthetic */ Function0 $action;
|
|
public final /* synthetic */ Backoff.TimerScheduler this$0;
|
|
|
|
public Backoff$TimerScheduler$schedule$1(Backoff.TimerScheduler timerScheduler, Function0 function0) {
|
|
this.this$0 = timerScheduler;
|
|
this.$action = function0;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARNING: Unknown variable types count: 1 */
|
|
@Override // java.util.TimerTask, java.lang.Runnable
|
|
public void run() {
|
|
if (Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0) == null) {
|
|
this.$action.mo1invoke();
|
|
return;
|
|
}
|
|
Logger logger = LoggingProvider.INSTANCE.get();
|
|
if (Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0).isShutdown()) {
|
|
Logger.i$default(logger, Backoff.TimerScheduler.access$getTag$p(this.this$0), "skipping delayed task. executor is not running", null, 4, null);
|
|
return;
|
|
}
|
|
Logger.v$default(logger, Backoff.TimerScheduler.access$getTag$p(this.this$0), "TimerScheduler posting to delegate scheduler", null, 4, null);
|
|
ExecutorService access$getDelegateExecutor$p = Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0);
|
|
Function0 function0 = this.$action;
|
|
if (function0 != null) {
|
|
function0 = new Backoff$sam$java_lang_Runnable$0(function0);
|
|
}
|
|
access$getDelegateExecutor$p.execute((Runnable) function0);
|
|
}
|
|
}
|