what-the-bank/sources/o/Qsl.java

49 lines
1.3 KiB
Java

package o;
import android.os.Handler;
import android.os.Looper;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* loaded from: classes2.dex */
public final class Qsl {
private static final int b;
private static final int c;
private static final Qsl e = new Qsl();
private final Executor a = new IeS(0);
/* loaded from: classes2.dex */
static final class IeS implements Executor {
@Override // java.util.concurrent.Executor
public final void execute(Runnable runnable) {
new Handler(Looper.getMainLooper()).post(runnable);
}
/* synthetic */ IeS(byte b) {
this();
}
private IeS() {
}
}
public static Executor b() {
return e.a;
}
public static ExecutorService c() {
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(b, c, 1L, TimeUnit.SECONDS, new LinkedBlockingQueue());
threadPoolExecutor.allowCoreThreadTimeOut(true);
return threadPoolExecutor;
}
static {
int availableProcessors = Runtime.getRuntime().availableProcessors();
b = availableProcessors + 1;
c = (availableProcessors << 1) + 1;
}
}