Files
rr3-apk/decompiled/sources/com/helpshift/concurrency/NotifyingRunnable.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

45 lines
1.3 KiB
Java

package com.helpshift.concurrency;
import com.helpshift.log.HSLogger;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public class NotifyingRunnable implements Runnable {
public final Runnable runnable;
public final Object syncLock = new Object();
public AtomicBoolean isFinished = new AtomicBoolean(false);
public NotifyingRunnable(Runnable runnable) {
this.runnable = runnable;
}
public void waitForCompletion() {
synchronized (this.syncLock) {
while (!this.isFinished.get()) {
try {
this.syncLock.wait();
} catch (InterruptedException e) {
HSLogger.d("NotifyingRunnable", "Exception in NotifyingRunnable", e);
Thread.currentThread().interrupt();
}
}
}
}
@Override // java.lang.Runnable
public void run() {
synchronized (this.syncLock) {
try {
try {
this.runnable.run();
} finally {
this.isFinished.set(true);
this.syncLock.notifyAll();
}
} catch (Throwable th) {
throw th;
}
}
}
}