apkfuckery/com.discord/smali_classes2/rx/internal/util/d.smali

49 lines
1.1 KiB
Smali

.class public final Lrx/internal/util/d;
.super Ljava/lang/Object;
.source "BlockingUtils.java"
# direct methods
.method public static a(Ljava/util/concurrent/CountDownLatch;Lrx/Subscription;)V
.locals 5
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->getCount()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-nez v4, :cond_0
return-void
:cond_0
:try_start_0
invoke-virtual {p0}, Ljava/util/concurrent/CountDownLatch;->await()V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
invoke-interface {p1}, Lrx/Subscription;->unsubscribe()V
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Thread;->interrupt()V
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Interrupted while waiting for subscription to complete."
invoke-direct {p1, v0, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p1
.end method