In the meantime, I'm using Single#asObservable()#asFlow().collect. It looks ugly and not even sure if it's correct, but it seems to work. I thinkSingle#blockingGet() will also work but I've run into very strange deadlock issues in the past with blockingGet on RxJava so I try to stay away from it.
Will it be possible to add a coroutine interop operator for
Single
? I see that the official interop library has some extensions for RxJava2: https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-rx2In the meantime, I'm using
Single#asObservable()#asFlow().collect
. It looks ugly and not even sure if it's correct, but it seems to work. I thinkSingle#blockingGet()
will also work but I've run into very strange deadlock issues in the past with blockingGet on RxJava so I try to stay away from it.