elizarov
12/20/2016, 10:26 AMsuspend operator hasNext()
and suspend operator next()
. They can do suspendCoroutine
and wait (non-blocking) until the value is observed, then resume the coroutine. This way you'll be able to use Kotlin's for
loop with your observables.