package o1;

import eb.e;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import nb.g;

/* JADX INFO: loaded from: classes.dex */
public final class b {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final e f31284a = new e();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final LinkedHashMap f31285b = new LinkedHashMap();

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final LinkedHashSet f31286c = new LinkedHashSet();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public volatile boolean f31287d;

    public static void b(AutoCloseable autoCloseable) {
        if (autoCloseable != null) {
            try {
                autoCloseable.close();
            } catch (Exception e10) {
                throw new RuntimeException(e10);
            }
        }
    }

    public final void a(AutoCloseable autoCloseable) {
        g.i(autoCloseable, "closeable");
        if (this.f31287d) {
            b(autoCloseable);
            return;
        }
        synchronized (this.f31284a) {
            this.f31286c.add(autoCloseable);
        }
    }
}
