d.smali

.class public final Lh9/d;
.super Lkotlinx/coroutines/CoroutineDispatcher;
.source "ThreadPoolPlus.kt"


# instance fields
.field public final a:Ljava/util/concurrent/ExecutorService;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Ljava/util/concurrent/ExecutorService;)V
    .registers 2

    invoke-direct {p0}, Lkotlinx/coroutines/CoroutineDispatcher;-><init>()V

    iput-object p1, p0, Lh9/d;->a:Ljava/util/concurrent/ExecutorService;

    return-void
.end method


# virtual methods
.method public dispatch(Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
    .registers 4

    :try_start_0
    iget-object p1, p0, Lh9/d;->a:Ljava/util/concurrent/ExecutorService;

    invoke-interface {p1, p2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
    :try_end_5
    .catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_5} :catch_6

    goto :goto_16

    :catch_6
    move-exception p1

    sget-object p2, Lf9/a;->o:Lf9/a;

    invoke-virtual {p2}, Lf9/a;->m()Z

    move-result p2

    if-eqz p2, :cond_16

    const-string p2, "AThreadPool"

    const-string v0, "Coroutine thread dispatch failed"

    invoke-static {p2, v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_16
    :goto_16
    return-void
.end method

.method public plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
    .registers 3

    sget-object v0, Lf9/a;->o:Lf9/a;

    invoke-virtual {v0}, Lf9/a;->m()Z

    move-result v0

    if-eqz v0, :cond_1d

    sget-object v0, Lkotlin/coroutines/ContinuationInterceptor;->Key:Lkotlin/coroutines/ContinuationInterceptor$Key;

    invoke-interface {p1, v0}, Lkotlin/coroutines/CoroutineContext;->get(Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;

    move-result-object v0

    check-cast v0, Lkotlin/coroutines/ContinuationInterceptor;

    instance-of v0, v0, Lkotlinx/coroutines/MainCoroutineDispatcher;

    if-nez v0, :cond_15

    goto :goto_1d

    :cond_15
    new-instance p1, Ljava/lang/UnsupportedOperationException;

    const-string v0, "you can not plus a context running in main thread. because it\'s meaningless"

    invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_1d
    :goto_1d
    invoke-super {p0, p1}, Lkotlin/coroutines/AbstractCoroutineContextElement;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;

    move-result-object p1

    return-object p1
.end method