Hi <@UHAJKUSTU> Does `blockingGet()` work in `JS`?...
# reaktive
o
Hi @Arkadii Ivanov Does
blockingGet()
work in
JS
? I have
Copy code
Test
fun test_blockingGet() {
    val value = single<Int> { emitter -> emitter.onSuccess(1) }.blockingGet()
    println(value)
}
And I'm getting:
Copy code
IllegalStateException: Condition is not supported in JavaScript
	at IllegalStateException.init(../build/js/packages_imported/kotlin/1.3.72/kotlin/exceptions.kt:66)
	at Lock.newCondition(../utils/src/jsMain/kotlin/com/badoo/reaktive/utils/lock/Lock.kt:18)
	at <global>.blockingGet(../reaktive/src/commonMain/kotlin/com/badoo/reaktive/utils/lock/Various.kt:5)
Using
subscribeOn
or
singleOf(1)
fail too
a
Hey, no this is conceptually impossible in JS. For the same reason there is no
runBlocking
in JS. I will update the doc.
o
Yeah, that's what I though, thanks anyway
👍 1