2021-08-18 07:29:27 +00:00
|
|
|
package com.discord.utilities.threading;
|
|
|
|
|
2021-10-18 07:12:10 +00:00
|
|
|
import c0.z.d.m;
|
2021-08-18 07:29:27 +00:00
|
|
|
import java.util.concurrent.ThreadFactory;
|
|
|
|
/* compiled from: PriorityThreadFactory.kt */
|
|
|
|
public final class PriorityThreadFactory implements ThreadFactory {
|
|
|
|
private final int threadPriority;
|
|
|
|
|
|
|
|
public PriorityThreadFactory(int i) {
|
|
|
|
this.threadPriority = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.util.concurrent.ThreadFactory
|
|
|
|
public Thread newThread(Runnable runnable) {
|
|
|
|
m.checkNotNullParameter(runnable, "runnable");
|
2021-08-31 07:21:49 +00:00
|
|
|
Thread thread = new Thread(runnable);
|
|
|
|
thread.setPriority(this.threadPriority);
|
|
|
|
return thread;
|
2021-08-18 07:29:27 +00:00
|
|
|
}
|
|
|
|
}
|