package androidx.concurrent.futures;

/* JADX INFO: loaded from: classes.dex */
public final class e extends com.bumptech.glide.h {
    @Override // com.bumptech.glide.h
    public final void A(f fVar, Thread thread) {
        fVar.thread = thread;
    }

    @Override // com.bumptech.glide.h
    public final boolean c(g gVar, c cVar, c cVar2) {
        synchronized (gVar) {
            try {
                if (gVar.listeners != cVar) {
                    return false;
                }
                gVar.listeners = cVar2;
                return true;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // com.bumptech.glide.h
    public final boolean e(g gVar, Object obj, Object obj2) {
        synchronized (gVar) {
            try {
                if (gVar.value != obj) {
                    return false;
                }
                gVar.value = obj2;
                return true;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // com.bumptech.glide.h
    public final boolean g(g gVar, f fVar, f fVar2) {
        synchronized (gVar) {
            try {
                if (gVar.waiters != fVar) {
                    return false;
                }
                gVar.waiters = fVar2;
                return true;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // com.bumptech.glide.h
    public final void y(f fVar, f fVar2) {
        fVar.next = fVar2;
    }
}
