f.smali

.class public final Lio/reactivex/internal/observers/f;
.super Ljava/util/concurrent/CountDownLatch;
.source "BlockingMultiObserver.java"

# interfaces
.implements Lio/reactivex/b;
.implements Lio/reactivex/h;
.implements Lio/reactivex/z;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/util/concurrent/CountDownLatch;",
        "Lio/reactivex/b;",
        "Lio/reactivex/h",
        "<TT;>;",
        "Lio/reactivex/z",
        "<TT;>;"
    }
.end annotation


# instance fields
.field private volatile cancelled:Z

.field private d:Lio/reactivex/disposables/b;

.field private error:Ljava/lang/Throwable;

.field private value:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TT;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 38
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V

    .line 39
    return-void
.end method


# virtual methods
.method public final Pn()Ljava/lang/Object;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TT;"
        }
    .end annotation

    .prologue
    .line 80
    invoke-virtual {p0}, Lio/reactivex/internal/observers/f;->getCount()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v0, v0, v2

    if-eqz v0, :cond_f

    .line 2167
    :try_start_a
    sget-boolean v0, Lio/reactivex/d/a;->bTG:Z

    .line 83
    invoke-virtual {p0}, Lio/reactivex/internal/observers/f;->await()V
    :try_end_f
    .catch Ljava/lang/InterruptedException; {:try_start_a .. :try_end_f} :catch_18

    .line 89
    :cond_f
    iget-object v0, p0, Lio/reactivex/internal/observers/f;->error:Ljava/lang/Throwable;

    .line 90
    if-eqz v0, :cond_28

    .line 91
    invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->l(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;

    move-result-object v0

    throw v0

    .line 84
    :catch_18
    move-exception v0

    .line 4042
    const/4 v1, 0x1

    iput-boolean v1, p0, Lio/reactivex/internal/observers/f;->cancelled:Z

    .line 4043
    iget-object v1, p0, Lio/reactivex/internal/observers/f;->d:Lio/reactivex/disposables/b;

    .line 4044
    if-eqz v1, :cond_23

    .line 4045
    invoke-interface {v1}, Lio/reactivex/disposables/b;->dispose()V

    .line 86
    :cond_23
    invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->l(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;

    move-result-object v0

    throw v0

    .line 93
    :cond_28
    iget-object v0, p0, Lio/reactivex/internal/observers/f;->value:Ljava/lang/Object;

    return-object v0
.end method

.method public final onComplete()V
    .registers 1

    .prologue
    .line 71
    invoke-virtual {p0}, Lio/reactivex/internal/observers/f;->countDown()V

    .line 72
    return-void
.end method

.method public final onError(Ljava/lang/Throwable;)V
    .registers 2

    .prologue
    .line 65
    iput-object p1, p0, Lio/reactivex/internal/observers/f;->error:Ljava/lang/Throwable;

    .line 66
    invoke-virtual {p0}, Lio/reactivex/internal/observers/f;->countDown()V

    .line 67
    return-void
.end method

.method public final onSubscribe(Lio/reactivex/disposables/b;)V
    .registers 3

    .prologue
    .line 51
    iput-object p1, p0, Lio/reactivex/internal/observers/f;->d:Lio/reactivex/disposables/b;

    .line 52
    iget-boolean v0, p0, Lio/reactivex/internal/observers/f;->cancelled:Z

    if-eqz v0, :cond_9

    .line 53
    invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V

    .line 55
    :cond_9
    return-void
.end method

.method public final onSuccess(Ljava/lang/Object;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    .prologue
    .line 59
    iput-object p1, p0, Lio/reactivex/internal/observers/f;->value:Ljava/lang/Object;

    .line 60
    invoke-virtual {p0}, Lio/reactivex/internal/observers/f;->countDown()V

    .line 61
    return-void
.end method