114 lines
4 KiB
Java
114 lines
4 KiB
Java
package s.a;
|
|
|
|
import d0.k;
|
|
import d0.z.d.m;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
|
import kotlin.Unit;
|
|
import kotlinx.coroutines.CancellableContinuation;
|
|
import kotlinx.coroutines.Job;
|
|
/* compiled from: Await.kt */
|
|
public final class d<T> {
|
|
public static final AtomicIntegerFieldUpdater a = AtomicIntegerFieldUpdater.newUpdater(d.class, "notCompletedCount");
|
|
public final e0<T>[] b;
|
|
public volatile int notCompletedCount;
|
|
|
|
/* compiled from: Await.kt */
|
|
public final class a extends f1<Job> {
|
|
public volatile Object _disposer = null;
|
|
public l0 m;
|
|
public final CancellableContinuation<List<? extends T>> n;
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kotlinx.coroutines.CancellableContinuation<? super java.util.List<? extends T>> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public a(CancellableContinuation<? super List<? extends T>> cancellableContinuation, Job job) {
|
|
super(job);
|
|
this.n = cancellableContinuation;
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
|
|
q(th);
|
|
return Unit.a;
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: java.util.concurrent.atomic.AtomicIntegerFieldUpdater */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // s.a.x
|
|
public void q(Throwable th) {
|
|
if (th != null) {
|
|
Object g = this.n.g(th);
|
|
if (g != null) {
|
|
this.n.k(g);
|
|
b bVar = (b) this._disposer;
|
|
if (bVar != null) {
|
|
bVar.b();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (d.a.decrementAndGet(d.this) == 0) {
|
|
CancellableContinuation<List<? extends T>> cancellableContinuation = this.n;
|
|
e0<T>[] e0VarArr = d.this.b;
|
|
ArrayList arrayList = new ArrayList(e0VarArr.length);
|
|
for (e0<T> e0Var : e0VarArr) {
|
|
arrayList.add(e0Var.c());
|
|
}
|
|
k.a aVar = k.i;
|
|
cancellableContinuation.resumeWith(k.m78constructorimpl(arrayList));
|
|
}
|
|
}
|
|
}
|
|
|
|
/* compiled from: Await.kt */
|
|
public final class b extends i {
|
|
public final d<T>.a[] i;
|
|
|
|
public b(d dVar, d<T>.a[] aVarArr) {
|
|
this.i = aVarArr;
|
|
}
|
|
|
|
@Override // s.a.j
|
|
public void a(Throwable th) {
|
|
b();
|
|
}
|
|
|
|
public final void b() {
|
|
for (d<T>.a aVar : this.i) {
|
|
l0 l0Var = aVar.m;
|
|
if (l0Var == null) {
|
|
m.throwUninitializedPropertyAccessException("handle");
|
|
}
|
|
l0Var.dispose();
|
|
}
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public Unit invoke(Throwable th) {
|
|
b();
|
|
return Unit.a;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = c.d.b.a.a.L("DisposeHandlersOnCancel[");
|
|
L.append(this.i);
|
|
L.append(']');
|
|
return L.toString();
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: s.a.e0<? extends T>[] */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public d(e0<? extends T>[] e0VarArr) {
|
|
this.b = e0VarArr;
|
|
this.notCompletedCount = e0VarArr.length;
|
|
}
|
|
}
|