package androidx.room; import java.util.ArrayDeque; import java.util.concurrent.Executor; /* loaded from: classes.dex */ class l implements Executor { /* renamed from: a, reason: collision with root package name */ private final Executor f2653a; /* renamed from: b, reason: collision with root package name */ private final ArrayDeque f2654b = new ArrayDeque(); /* renamed from: c, reason: collision with root package name */ private Runnable f2655c; class a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ Runnable f2656a; a(Runnable runnable) { this.f2656a = runnable; } @Override // java.lang.Runnable public void run() { try { this.f2656a.run(); } finally { l.this.a(); } } } l(Executor executor) { this.f2653a = executor; } synchronized void a() { Runnable runnable = (Runnable) this.f2654b.poll(); this.f2655c = runnable; if (runnable != null) { this.f2653a.execute(runnable); } } @Override // java.util.concurrent.Executor public synchronized void execute(Runnable runnable) { this.f2654b.offer(new a(runnable)); if (this.f2655c == null) { a(); } } }