29 lines
956 B
Java
29 lines
956 B
Java
|
package o;
|
||
|
|
||
|
import java.util.concurrent.LinkedBlockingDeque;
|
||
|
import java.util.concurrent.ThreadFactory;
|
||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||
|
import java.util.concurrent.TimeUnit;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class GOe {
|
||
|
public static ThreadPoolExecutor c(final String str) {
|
||
|
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 15L, TimeUnit.SECONDS, new LinkedBlockingDeque(), new ThreadFactory(str) { // from class: o.Yda
|
||
|
public final String e;
|
||
|
|
||
|
@Override // java.util.concurrent.ThreadFactory
|
||
|
public final Thread newThread(Runnable runnable) {
|
||
|
Thread thread = new Thread(runnable, this.e);
|
||
|
thread.setPriority(10);
|
||
|
return thread;
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = str;
|
||
|
}
|
||
|
});
|
||
|
threadPoolExecutor.allowCoreThreadTimeOut(true);
|
||
|
return threadPoolExecutor;
|
||
|
}
|
||
|
}
|