package h.a;

/* JADX INFO: compiled from: AbstractCoroutine.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public abstract class a<T> extends v0 implements r0, g.e0.d<T> {
    @Override // h.a.v0
    public final void B(Object obj) {
        if (obj instanceof l) {
            l lVar = (l) obj;
            Throwable th = lVar.f4276b;
            lVar.a();
        }
    }

    public void H(Object obj) {
        j(obj);
    }

    @Override // h.a.v0, h.a.r0
    public boolean a() {
        return super.a();
    }

    @Override // g.e0.d
    public final g.e0.f e() {
        return null;
    }

    @Override // g.e0.d
    public final void f(Object obj) {
        Object objF;
        Object objN1 = f.a.y.a.n1(obj, null);
        do {
            objF = F(v(), objN1);
            if (objF == w0.a) {
                String str = "Job " + this + " is already complete or completing, but is being completed with " + objN1;
                l lVar = objN1 instanceof l ? (l) objN1 : null;
                throw new IllegalStateException(str, lVar != null ? lVar.f4276b : null);
            }
        } while (objF == w0.f4342c);
        if (objF == w0.f4341b) {
            return;
        }
        H(objF);
    }

    @Override // h.a.v0
    public String q() {
        return g.h0.c.l.k(getClass().getSimpleName(), " was cancelled");
    }

    @Override // h.a.v0
    public final void w(Throwable th) {
        f.a.y.a.j0(null, th);
    }

    @Override // h.a.v0
    public String y() {
        return super.y();
    }
}
