mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
1250 lines
34 KiB
Smali
1250 lines
34 KiB
Smali
.class public final Lokhttp3/internal/concurrent/TaskRunner;
|
|
.super Ljava/lang/Object;
|
|
.source "TaskRunner.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/concurrent/TaskRunner$Backend;,
|
|
Lokhttp3/internal/concurrent/TaskRunner$RealBackend;,
|
|
Lokhttp3/internal/concurrent/TaskRunner$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nTaskRunner.kt\nKotlin\n*S Kotlin\n*F\n+ 1 TaskRunner.kt\nokhttp3/internal/concurrent/TaskRunner\n+ 2 Util.kt\nokhttp3/internal/Util\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,314:1\n601#2,4:315\n601#2,4:319\n608#2,4:323\n601#2,4:327\n601#2,4:331\n1#3:335\n*E\n*S KotlinDebug\n*F\n+ 1 TaskRunner.kt\nokhttp3/internal/concurrent/TaskRunner\n*L\n79#1,4:315\n97#1,4:319\n108#1,4:323\n126#1,4:327\n152#1,4:331\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000J\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\r\u0018\u0000 #2\u00020\u0001:\u0003\"#$B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u000c\u0010\u0013\u001a\u0008\u0012\u0004\u0012\u00020\t0\u0014J\u0018\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\rH\u0002J\u0008\u0010\u001a\u001a\u0004\u0018\u00010\u0018J\u0010\u0010\u001b\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0002J\u0006\u0010\u001c\u001a\u00020\u0016J\u0015\u0010\u001d\u001a\u00020\u00162\u0006\u0010\u001e\u001a\u00020\tH\u0000\u00a2\u0006\u0002\u0008\u001fJ\u0006\u0010 \u001a\u00020\tJ\u0010\u0010!\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0002R\u0011\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0005\u0010\u0006R\u0014\u0010\u0007\u001a\u0008\u0012\u0004\u0012\u00020\t0\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000c\u001a\u00020\rX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0010\u001a\u0008\u0012\u0004\u0012\u00020\t0\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0012X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006%"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/concurrent/TaskRunner;",
|
|
"",
|
|
"backend",
|
|
"Lokhttp3/internal/concurrent/TaskRunner$Backend;",
|
|
"(Lokhttp3/internal/concurrent/TaskRunner$Backend;)V",
|
|
"getBackend",
|
|
"()Lokhttp3/internal/concurrent/TaskRunner$Backend;",
|
|
"busyQueues",
|
|
"",
|
|
"Lokhttp3/internal/concurrent/TaskQueue;",
|
|
"coordinatorWaiting",
|
|
"",
|
|
"coordinatorWakeUpAt",
|
|
"",
|
|
"nextQueueName",
|
|
"",
|
|
"readyQueues",
|
|
"runnable",
|
|
"Ljava/lang/Runnable;",
|
|
"activeQueues",
|
|
"",
|
|
"afterRun",
|
|
"",
|
|
"task",
|
|
"Lokhttp3/internal/concurrent/Task;",
|
|
"delayNanos",
|
|
"awaitTaskToRun",
|
|
"beforeRun",
|
|
"cancelAll",
|
|
"kickCoordinator",
|
|
"taskQueue",
|
|
"kickCoordinator$okhttp",
|
|
"newQueue",
|
|
"runTask",
|
|
"Backend",
|
|
"Companion",
|
|
"RealBackend",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/concurrent/TaskRunner$Companion;
|
|
|
|
.field public static final INSTANCE:Lokhttp3/internal/concurrent/TaskRunner;
|
|
|
|
.field private static final logger:Ljava/util/logging/Logger;
|
|
|
|
|
|
# instance fields
|
|
.field private final backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
.field private final busyQueues:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/internal/concurrent/TaskQueue;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private coordinatorWaiting:Z
|
|
|
|
.field private coordinatorWakeUpAt:J
|
|
|
|
.field private nextQueueName:I
|
|
|
|
.field private final readyQueues:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/internal/concurrent/TaskQueue;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final runnable:Ljava/lang/Runnable;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 4
|
|
|
|
new-instance v0, Lokhttp3/internal/concurrent/TaskRunner$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/concurrent/TaskRunner$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/concurrent/TaskRunner;->Companion:Lokhttp3/internal/concurrent/TaskRunner$Companion;
|
|
|
|
.line 309
|
|
new-instance v0, Lokhttp3/internal/concurrent/TaskRunner;
|
|
|
|
new-instance v1, Lokhttp3/internal/concurrent/TaskRunner$RealBackend;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
sget-object v3, Lokhttp3/internal/Util;->okHttpName:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, " TaskRunner"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-static {v2, v3}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Lokhttp3/internal/concurrent/TaskRunner$RealBackend;-><init>(Ljava/util/concurrent/ThreadFactory;)V
|
|
|
|
check-cast v1, Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/concurrent/TaskRunner;-><init>(Lokhttp3/internal/concurrent/TaskRunner$Backend;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/concurrent/TaskRunner;->INSTANCE:Lokhttp3/internal/concurrent/TaskRunner;
|
|
|
|
const-class v0, Lokhttp3/internal/concurrent/TaskRunner;
|
|
|
|
.line 311
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Logger.getLogger(TaskRunner::class.java.name)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/concurrent/TaskRunner;->logger:Ljava/util/logging/Logger;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/internal/concurrent/TaskRunner$Backend;)V
|
|
.locals 1
|
|
|
|
const-string v0, "backend"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 42
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
const/16 p1, 0x2710
|
|
|
|
iput p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->nextQueueName:I
|
|
|
|
.line 50
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 53
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 55
|
|
new-instance p1, Lokhttp3/internal/concurrent/TaskRunner$runnable$1;
|
|
|
|
invoke-direct {p1, p0}, Lokhttp3/internal/concurrent/TaskRunner$runnable$1;-><init>(Lokhttp3/internal/concurrent/TaskRunner;)V
|
|
|
|
check-cast p1, Ljava/lang/Runnable;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->runnable:Ljava/lang/Runnable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getLogger$cp()Ljava/util/logging/Logger;
|
|
.locals 1
|
|
|
|
sget-object v0, Lokhttp3/internal/concurrent/TaskRunner;->logger:Ljava/util/logging/Logger;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$runTask(Lokhttp3/internal/concurrent/TaskRunner;Lokhttp3/internal/concurrent/Task;)V
|
|
.locals 0
|
|
|
|
.line 42
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/concurrent/TaskRunner;->runTask(Lokhttp3/internal/concurrent/Task;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final afterRun(Lokhttp3/internal/concurrent/Task;J)V
|
|
.locals 6
|
|
|
|
.line 327
|
|
sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 328
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
const-string p3, "Thread "
|
|
|
|
invoke-direct {p2, p3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object p3
|
|
|
|
const-string v0, "Thread.currentThread()"
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, " MUST hold lock on "
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
.line 128
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/Task;->getQueue$okhttp()Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
.line 129
|
|
invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->getActiveTask$okhttp()Lokhttp3/internal/concurrent/Task;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v1, p1, :cond_2
|
|
|
|
move v1, v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move v1, v2
|
|
|
|
:goto_1
|
|
if-eqz v1, :cond_5
|
|
|
|
.line 131
|
|
invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->getCancelActiveTask$okhttp()Z
|
|
|
|
move-result v1
|
|
|
|
.line 132
|
|
invoke-virtual {v0, v2}, Lokhttp3/internal/concurrent/TaskQueue;->setCancelActiveTask$okhttp(Z)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 133
|
|
move-object v4, v2
|
|
|
|
check-cast v4, Lokhttp3/internal/concurrent/Task;
|
|
|
|
invoke-virtual {v0, v2}, Lokhttp3/internal/concurrent/TaskQueue;->setActiveTask$okhttp(Lokhttp3/internal/concurrent/Task;)V
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 134
|
|
invoke-interface {v2, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
const-wide/16 v4, -0x1
|
|
|
|
cmp-long v2, p2, v4
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
.line 136
|
|
invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->getShutdown$okhttp()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
.line 137
|
|
invoke-virtual {v0, p1, p2, p3, v3}, Lokhttp3/internal/concurrent/TaskQueue;->scheduleAndDecide$okhttp(Lokhttp3/internal/concurrent/Task;JZ)Z
|
|
|
|
.line 140
|
|
:cond_3
|
|
invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->getFutureTasks$okhttp()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Collection;
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/2addr p1, v3
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 141
|
|
invoke-interface {p0, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_4
|
|
return-void
|
|
|
|
.line 129
|
|
:cond_5
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p1, "Check failed."
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method private final beforeRun(Lokhttp3/internal/concurrent/Task;)V
|
|
.locals 3
|
|
|
|
.line 319
|
|
sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 320
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Thread "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Thread.currentThread()"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, " MUST hold lock on "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const-wide/16 v0, -0x1
|
|
|
|
.line 99
|
|
invoke-virtual {p1, v0, v1}, Lokhttp3/internal/concurrent/Task;->setNextExecuteNanoTime$okhttp(J)V
|
|
|
|
.line 100
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/Task;->getQueue$okhttp()Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
.line 101
|
|
invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->getFutureTasks$okhttp()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 102
|
|
invoke-interface {v1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
.line 103
|
|
invoke-virtual {v0, p1}, Lokhttp3/internal/concurrent/TaskQueue;->setActiveTask$okhttp(Lokhttp3/internal/concurrent/Task;)V
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 104
|
|
invoke-interface {p0, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final runTask(Lokhttp3/internal/concurrent/Task;)V
|
|
.locals 5
|
|
|
|
.line 323
|
|
sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 324
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Thread "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Thread.currentThread()"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, " MUST NOT hold lock on "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
.line 110
|
|
:cond_1
|
|
:goto_0
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "currentThread"
|
|
|
|
.line 111
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
.line 112
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/Task;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
|
|
|
|
.line 116
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/Task;->runOnce()J
|
|
|
|
move-result-wide v2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 118
|
|
monitor-enter p0
|
|
|
|
.line 119
|
|
:try_start_1
|
|
invoke-direct {p0, p1, v2, v3}, Lokhttp3/internal/concurrent/TaskRunner;->afterRun(Lokhttp3/internal/concurrent/Task;J)V
|
|
|
|
.line 120
|
|
sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 118
|
|
monitor-exit p0
|
|
|
|
.line 121
|
|
invoke-virtual {v0, v1}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 118
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception v2
|
|
|
|
monitor-enter p0
|
|
|
|
const-wide/16 v3, -0x1
|
|
|
|
.line 119
|
|
:try_start_2
|
|
invoke-direct {p0, p1, v3, v4}, Lokhttp3/internal/concurrent/TaskRunner;->afterRun(Lokhttp3/internal/concurrent/Task;J)V
|
|
|
|
.line 120
|
|
sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
.line 118
|
|
monitor-exit p0
|
|
|
|
.line 121
|
|
invoke-virtual {v0, v1}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
.line 118
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final activeQueues()Ljava/util/List;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/internal/concurrent/TaskQueue;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 240
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 241
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
invoke-static {v0, v1}, Lkotlin/collections/CollectionsKt;->plus(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
.line 240
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final awaitTaskToRun()Lokhttp3/internal/concurrent/Task;
|
|
.locals 14
|
|
|
|
.line 331
|
|
sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 332
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Thread "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Thread.currentThread()"
|
|
|
|
invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, " MUST hold lock on "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 155
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
.line 159
|
|
invoke-interface {v0}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->nanoTime()J
|
|
|
|
move-result-wide v2
|
|
|
|
.line 161
|
|
move-object v0, v1
|
|
|
|
check-cast v0, Lokhttp3/internal/concurrent/Task;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 167
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide v4, 0x7fffffffffffffffL
|
|
|
|
move-object v6, v1
|
|
|
|
:goto_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v7
|
|
|
|
const/4 v8, 0x1
|
|
|
|
const/4 v9, 0x0
|
|
|
|
if-eqz v7, :cond_5
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
.line 168
|
|
invoke-virtual {v7}, Lokhttp3/internal/concurrent/TaskQueue;->getFutureTasks$okhttp()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v7, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Lokhttp3/internal/concurrent/Task;
|
|
|
|
.line 169
|
|
invoke-virtual {v7}, Lokhttp3/internal/concurrent/Task;->getNextExecuteNanoTime$okhttp()J
|
|
|
|
move-result-wide v10
|
|
|
|
sub-long/2addr v10, v2
|
|
|
|
const-wide/16 v12, 0x0
|
|
|
|
invoke-static {v12, v13, v10, v11}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide v10
|
|
|
|
cmp-long v12, v10, v12
|
|
|
|
if-lez v12, :cond_3
|
|
|
|
.line 174
|
|
invoke-static {v10, v11, v4, v5}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
if-eqz v6, :cond_4
|
|
|
|
move v0, v8
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
move-object v6, v7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
move v0, v9
|
|
|
|
:goto_2
|
|
if-eqz v6, :cond_8
|
|
|
|
.line 195
|
|
invoke-direct {p0, v6}, Lokhttp3/internal/concurrent/TaskRunner;->beforeRun(Lokhttp3/internal/concurrent/Task;)V
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
if-nez v0, :cond_7
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 198
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/2addr v0, v8
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
:cond_6
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/concurrent/TaskRunner;->runnable:Ljava/lang/Runnable;
|
|
|
|
.line 199
|
|
invoke-interface {v0, p0}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->execute(Ljava/lang/Runnable;)V
|
|
|
|
:cond_7
|
|
return-object v6
|
|
|
|
:cond_8
|
|
iget-boolean v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
iget-wide v6, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWakeUpAt:J
|
|
|
|
sub-long/2addr v6, v2
|
|
|
|
cmp-long v0, v4, v6
|
|
|
|
if-gez v0, :cond_9
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
.line 208
|
|
invoke-interface {v0, p0}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->coordinatorNotify(Lokhttp3/internal/concurrent/TaskRunner;)V
|
|
|
|
:cond_9
|
|
return-object v1
|
|
|
|
:cond_a
|
|
iput-boolean v8, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
iput-wide v2, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWakeUpAt:J
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
.line 218
|
|
invoke-interface {v0, p0, v4, v5}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->coordinatorWait(Lokhttp3/internal/concurrent/TaskRunner;J)V
|
|
:try_end_0
|
|
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_3
|
|
iput-boolean v9, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
goto/16 :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_4
|
|
|
|
.line 221
|
|
:catch_0
|
|
:try_start_1
|
|
invoke-virtual {p0}, Lokhttp3/internal/concurrent/TaskRunner;->cancelAll()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_3
|
|
|
|
:goto_4
|
|
iput-boolean v9, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
.line 223
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final cancelAll()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 246
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
:goto_0
|
|
if-ltz v0, :cond_0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->busyQueues:Ljava/util/List;
|
|
|
|
.line 247
|
|
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/concurrent/TaskQueue;->cancelAllAndDecide$okhttp()Z
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 249
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
:goto_1
|
|
if-ltz v0, :cond_2
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 250
|
|
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
.line 251
|
|
invoke-virtual {v1}, Lokhttp3/internal/concurrent/TaskQueue;->cancelAllAndDecide$okhttp()Z
|
|
|
|
.line 252
|
|
invoke-virtual {v1}, Lokhttp3/internal/concurrent/TaskQueue;->getFutureTasks$okhttp()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 253
|
|
invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
|
|
|
:cond_1
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getBackend()Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final kickCoordinator$okhttp(Lokhttp3/internal/concurrent/TaskQueue;)V
|
|
.locals 3
|
|
|
|
const-string v0, "taskQueue"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 315
|
|
sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 316
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Thread "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Thread.currentThread()"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, " MUST hold lock on "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
.line 81
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/TaskQueue;->getActiveTask$okhttp()Lokhttp3/internal/concurrent/Task;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
.line 82
|
|
invoke-virtual {p1}, Lokhttp3/internal/concurrent/TaskQueue;->getFutureTasks$okhttp()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 83
|
|
invoke-static {v0, p1}, Lokhttp3/internal/Util;->addIfAbsent(Ljava/util/List;Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->readyQueues:Ljava/util/List;
|
|
|
|
.line 85
|
|
invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
:cond_3
|
|
:goto_1
|
|
iget-boolean p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->coordinatorWaiting:Z
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
.line 90
|
|
invoke-interface {p1, p0}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->coordinatorNotify(Lokhttp3/internal/concurrent/TaskRunner;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
iget-object p1, p0, Lokhttp3/internal/concurrent/TaskRunner;->backend:Lokhttp3/internal/concurrent/TaskRunner$Backend;
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/concurrent/TaskRunner;->runnable:Ljava/lang/Runnable;
|
|
|
|
.line 92
|
|
invoke-interface {p1, p0}, Lokhttp3/internal/concurrent/TaskRunner$Backend;->execute(Ljava/lang/Runnable;)V
|
|
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final newQueue()Lokhttp3/internal/concurrent/TaskQueue;
|
|
.locals 4
|
|
|
|
.line 231
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/internal/concurrent/TaskRunner;->nextQueueName:I
|
|
|
|
add-int/lit8 v1, v0, 0x1
|
|
|
|
iput v1, p0, Lokhttp3/internal/concurrent/TaskRunner;->nextQueueName:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
.line 232
|
|
new-instance v1, Lokhttp3/internal/concurrent/TaskQueue;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Q"
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, p0, v0}, Lokhttp3/internal/concurrent/TaskQueue;-><init>(Lokhttp3/internal/concurrent/TaskRunner;Ljava/lang/String;)V
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
.line 231
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|