2019-02-04 20:08:30 +00:00
|
|
|
.class final Lkotlinx/coroutines/c/f;
|
2019-02-04 20:32:01 +00:00
|
|
|
.super Lkotlinx/coroutines/an;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "Dispatcher.kt"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Ljava/util/concurrent/Executor;
|
|
|
|
.implements Lkotlinx/coroutines/c/j;
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2019-05-01 06:16:59 +00:00
|
|
|
.field private static final bhI:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-05-01 06:16:59 +00:00
|
|
|
.field private final bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:08:30 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/concurrent/ConcurrentLinkedQueue<",
|
|
|
|
"Ljava/lang/Runnable;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
.field private final bhJ:Lkotlinx/coroutines/c/d;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
.field private final bhK:I
|
2019-04-11 23:08:29 +00:00
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
.field private final bhL:Lkotlinx/coroutines/c/k;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
.field private volatile inFlightTasks:I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const-class v0, Lkotlinx/coroutines/c/f;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const-string v1, "inFlightTasks"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
sput-object v0, Lkotlinx/coroutines/c/f;->bhI:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lkotlinx/coroutines/c/d;ILkotlinx/coroutines/c/k;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "dispatcher"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string v0, "taskMode"
|
|
|
|
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-direct {p0}, Lkotlinx/coroutines/an;-><init>()V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iput-object p1, p0, Lkotlinx/coroutines/c/f;->bhJ:Lkotlinx/coroutines/c/d;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iput p2, p0, Lkotlinx/coroutines/c/f;->bhK:I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iput-object p3, p0, Lkotlinx/coroutines/c/f;->bhL:Lkotlinx/coroutines/c/k;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
new-instance p1, Ljava/util/concurrent/ConcurrentLinkedQueue;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iput-object p1, p0, Lkotlinx/coroutines/c/f;->bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
iput p1, p0, Lkotlinx/coroutines/c/f;->inFlightTasks:I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final a(Ljava/lang/Runnable;Z)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
:cond_0
|
2019-05-01 06:16:59 +00:00
|
|
|
sget-object v0, Lkotlinx/coroutines/c/f;->bhI:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->incrementAndGet(Ljava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget v1, p0, Lkotlinx/coroutines/c/f;->bhK:I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-gt v0, v1, :cond_1
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/c/f;->bhJ:Lkotlinx/coroutines/c/d;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-object v1, p0
|
|
|
|
|
|
|
|
check-cast v1, Lkotlinx/coroutines/c/j;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1, p2}, Lkotlinx/coroutines/c/d;->b(Ljava/lang/Runnable;Lkotlinx/coroutines/c/j;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/c/f;->bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/concurrent/ConcurrentLinkedQueue;->add(Ljava/lang/Object;)Z
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
sget-object p1, Lkotlinx/coroutines/c/f;->bhI:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->decrementAndGet(Ljava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget v0, p0, Lkotlinx/coroutines/c/f;->bhK:I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-lt p1, v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object p1, p0, Lkotlinx/coroutines/c/f;->bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/ConcurrentLinkedQueue;->poll()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final a(Lkotlin/c/e;Ljava/lang/Runnable;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "context"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string p1, "block"
|
|
|
|
|
|
|
|
invoke-static {p2, p1}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p2, p1}, Lkotlinx/coroutines/c/f;->a(Ljava/lang/Runnable;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final close()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string v1, "Close cannot be invoked on LimitingBlockingDispatcher"
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final execute(Ljava/lang/Runnable;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "command"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, v0}, Lkotlinx/coroutines/c/f;->a(Ljava/lang/Runnable;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-super {p0}, Lkotlinx/coroutines/an;->toString()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, "[dispatcher = "
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v1, p0, Lkotlinx/coroutines/c/f;->bhJ:Lkotlinx/coroutines/c/d;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const/16 v1, 0x5d
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
2019-02-04 20:32:01 +00:00
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
.method public final zQ()V
|
2019-02-04 20:32:01 +00:00
|
|
|
.locals 4
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/c/f;->bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:32:01 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->poll()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v2, p0, Lkotlinx/coroutines/c/f;->bhJ:Lkotlinx/coroutines/c/d;
|
2019-02-04 20:32:01 +00:00
|
|
|
|
|
|
|
move-object v3, p0
|
|
|
|
|
|
|
|
check-cast v3, Lkotlinx/coroutines/c/j;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0, v3, v1}, Lkotlinx/coroutines/c/d;->b(Ljava/lang/Runnable;Lkotlinx/coroutines/c/j;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2019-05-01 06:16:59 +00:00
|
|
|
sget-object v0, Lkotlinx/coroutines/c/f;->bhI:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
2019-02-04 20:32:01 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->decrementAndGet(Ljava/lang/Object;)I
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/c/f;->bhH:Ljava/util/concurrent/ConcurrentLinkedQueue;
|
2019-02-04 20:32:01 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->poll()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-direct {p0, v0, v1}, Lkotlinx/coroutines/c/f;->a(Ljava/lang/Runnable;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
.method public final zR()Lkotlinx/coroutines/c/k;
|
2019-02-04 20:32:01 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-05-01 06:16:59 +00:00
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/c/f;->bhL:Lkotlinx/coroutines/c/k;
|
2019-02-04 20:32:01 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|