123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- .class public abstract Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;
- .super Ljava/util/concurrent/CountDownLatch;
- .source "BlockingBaseSubscriber.java"
- # interfaces
- .implements Lorg/reactivestreams/Subscriber;
- # annotations
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">",
- "Ljava/util/concurrent/CountDownLatch;",
- "Lorg/reactivestreams/Subscriber<",
- "TT;>;"
- }
- .end annotation
- # instance fields
- .field volatile cancelled:Z
- .field error:Ljava/lang/Throwable;
- .field s:Lorg/reactivestreams/Subscription;
- .field value:Ljava/lang/Object;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "TT;"
- }
- .end annotation
- .end field
- # direct methods
- .method public constructor <init>()V
- .locals 1
- const/4 v0, 0x1
- .line 33
- invoke-direct {p0, v0}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
- return-void
- .end method
- # virtual methods
- .method public final blockingGet()Ljava/lang/Object;
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()TT;"
- }
- .end annotation
- .line 61
- invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->getCount()J
- move-result-wide v0
- const-wide/16 v2, 0x0
- cmp-long v4, v0, v2
- if-eqz v4, :cond_1
- .line 63
- :try_start_0
- invoke-static {}, Lio/reactivex/internal/util/BlockingHelper;->verifyNonBlocking()V
- .line 64
- invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->await()V
- :try_end_0
- .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
- goto :goto_0
- :catch_0
- move-exception v0
- .line 66
- iget-object v1, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->s:Lorg/reactivestreams/Subscription;
- .line 67
- sget-object v2, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/internal/subscriptions/SubscriptionHelper;
- iput-object v2, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->s:Lorg/reactivestreams/Subscription;
- if-eqz v1, :cond_0
- .line 69
- invoke-interface {v1}, Lorg/reactivestreams/Subscription;->cancel()V
- .line 71
- :cond_0
- invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->wrapOrThrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
- move-result-object v0
- throw v0
- .line 75
- :cond_1
- :goto_0
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->error:Ljava/lang/Throwable;
- if-nez v0, :cond_2
- .line 79
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->value:Ljava/lang/Object;
- return-object v0
- .line 77
- :cond_2
- invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->wrapOrThrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
- move-result-object v0
- throw v0
- .end method
- .method public final onComplete()V
- .locals 0
- .line 52
- invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->countDown()V
- return-void
- .end method
- .method public final onSubscribe(Lorg/reactivestreams/Subscription;)V
- .locals 2
- .line 38
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->s:Lorg/reactivestreams/Subscription;
- invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lorg/reactivestreams/Subscription;Lorg/reactivestreams/Subscription;)Z
- move-result v0
- if-eqz v0, :cond_0
- .line 39
- iput-object p1, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->s:Lorg/reactivestreams/Subscription;
- .line 40
- iget-boolean v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->cancelled:Z
- if-nez v0, :cond_0
- const-wide v0, 0x7fffffffffffffffL
- .line 41
- invoke-interface {p1, v0, v1}, Lorg/reactivestreams/Subscription;->request(J)V
- .line 42
- iget-boolean v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->cancelled:Z
- if-eqz v0, :cond_0
- .line 43
- sget-object v0, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/internal/subscriptions/SubscriptionHelper;
- iput-object v0, p0, Lio/reactivex/internal/subscribers/BlockingBaseSubscriber;->s:Lorg/reactivestreams/Subscription;
- .line 44
- invoke-interface {p1}, Lorg/reactivestreams/Subscription;->cancel()V
- :cond_0
- return-void
- .end method
|