• saket

    saket

    2 years ago
    is there a
    Completable#blockingAwait()
    operator?
    saket
    Arkadii Ivanov
    3 replies
    Copy to Clipboard
  • saket

    saket

    2 years ago
    should
    Subject.Status
    be internal?
    saket
    Arkadii Ivanov
    4 replies
    Copy to Clipboard
  • w

    wellingtoncosta

    2 years ago
    Hi! How can I use
    reaktive
    with
    ktor
    for http calls?
    w
    Arkadii Ivanov
    +1
    16 replies
    Copy to Clipboard
  • Arkadii Ivanov

    Arkadii Ivanov

    2 years ago
    Reaktive 1.1.16 is out! • Added 
    Completable.blockingAwait()
     operator (#497) • Added 
    getValue
     and 
    setValue
     extensions for atomics delegation (#496) • Added KDocs for interfaces with factory functions (#495) • Added 
    Emitter.setCancellable {}
     extension function (#503) • Added 
    TestScheduler.isManualProcessing
     variable property (#506) • Fixed a bug when some collection-based operators did not complete when the collection is empty (#501 by @amihusb)
    Arkadii Ivanov
    shikasd
    7 replies
    Copy to Clipboard
  • Omar Mainegra

    Omar Mainegra

    2 years ago
    Hi @Arkadii Ivanov Does
    blockingGet()
    work in
    JS
    ? I have
    Test
    fun test_blockingGet() {
        val value = single<Int> { emitter -> emitter.onSuccess(1) }.blockingGet()
        println(value)
    }
    And I'm getting:
    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)
    Omar Mainegra
    Arkadii Ivanov
    3 replies
    Copy to Clipboard
  • Omar Mainegra

    Omar Mainegra

    2 years ago
    Hi again 😄 Is there a way to convert from
    Single
    to a suspended function? I couldn't find anything in
    coroutines-interop
    module. Currently I'm doing
    val body = suspendCoroutine<String?> { continuation ->
        get("<https://postman-echo.com/get>", headers, query)
            .subscribe(
                onSuccess = { continuation.resume(it) }, 
                onError = { continuation.resumeWithException(it) } 
            )
    }
    It works in JVM and JS, but in Native I get
    kotlin.native.concurrent.FreezingException: freezing of $subscribe_2$<anonymous>_67$FUNCTION_REFERENCE$1621@e3e09f38 has failed, first blocker is EventLoopImpl@1c250dc8
    Omar Mainegra
    Arkadii Ivanov
    79 replies
    Copy to Clipboard
  • saket

    saket

    2 years ago
    is
    singleFromCoroutine
    what you’re looking for?
    saket
    Omar Mainegra
    7 replies
    Copy to Clipboard
  • Arkadii Ivanov

    Arkadii Ivanov

    2 years ago
    Hello. If somebody interested in
    coroutines-interop
    with mt coroutines, please check https://github.com/badoo/Reaktive/issues/304 It should be possible to publish a separate version. Please vote and/or respond. 🤘🚀
    Arkadii Ivanov
    Mina Eweida
    31 replies
    Copy to Clipboard
  • Arkadii Ivanov

    Arkadii Ivanov

    2 years ago
    Looks like there will be a version of Ktor compatible with mt coroutines 🙂 https://github.com/ktorio/ktor/commit/9785a7a82e89881ad279a77ac6adedfe621fb0b8
    Arkadii Ivanov
    Mina Eweida
    7 replies
    Copy to Clipboard
  • saket

    saket

    2 years ago
    can you share a gist of the optimization?
    saket
    Arkadii Ivanov
    4 replies
    Copy to Clipboard