jimu-decompiled/sources/org/greenrobot/eventbus/PendingPost.java
2025-05-13 19:24:51 +02:00

43 lines
1.0 KiB
Java

package org.greenrobot.eventbus;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes2.dex */
final class PendingPost {
private static final List<PendingPost> d = new ArrayList();
Object a;
Subscription b;
PendingPost c;
private PendingPost(Object obj, Subscription subscription) {
this.a = obj;
this.b = subscription;
}
static PendingPost a(Subscription subscription, Object obj) {
synchronized (d) {
int size = d.size();
if (size <= 0) {
return new PendingPost(obj, subscription);
}
PendingPost remove = d.remove(size - 1);
remove.a = obj;
remove.b = subscription;
remove.c = null;
return remove;
}
}
static void a(PendingPost pendingPost) {
pendingPost.a = null;
pendingPost.b = null;
pendingPost.c = null;
synchronized (d) {
if (d.size() < 10000) {
d.add(pendingPost);
}
}
}
}