- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
package com.helpshift.concurrency;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class HSThreadingService {
|
|
public final HSThreader hsuiThreader;
|
|
public final HSThreader networkService;
|
|
public final HSThreader serialQueue;
|
|
public final Object syncLock = new Object();
|
|
|
|
public HSThreader getNetworkService() {
|
|
return this.networkService;
|
|
}
|
|
|
|
public HSThreadingService(HSThreader hSThreader, HSThreader hSThreader2, HSThreader hSThreader3) {
|
|
this.networkService = hSThreader;
|
|
this.serialQueue = hSThreader2;
|
|
this.hsuiThreader = hSThreader3;
|
|
}
|
|
|
|
public void runSerial(Runnable runnable) {
|
|
this.serialQueue.submit(runnable);
|
|
}
|
|
|
|
public void runSync(Runnable runnable) {
|
|
NotifyingRunnable notifyingRunnable = new NotifyingRunnable(runnable);
|
|
synchronized (this.syncLock) {
|
|
runSerial(notifyingRunnable);
|
|
notifyingRunnable.waitForCompletion();
|
|
}
|
|
}
|
|
|
|
public void runOnUIThread(final Runnable runnable) {
|
|
this.serialQueue.submit(new Runnable() { // from class: com.helpshift.concurrency.HSThreadingService.2
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
HSThreadingService.this.hsuiThreader.submit(runnable);
|
|
}
|
|
});
|
|
}
|
|
}
|