You can wrap observables into a generic iterator, ...
# getting-started
e
You can wrap observables into a generic iterator, but that would mean that consumer will have to block a thread on calls to `hasNext()`/`next()` which limits scalability (threads are expensive resource). However, the revised implementation of coroutines coming to a Kotlin in 1.1-M04 lets you define non-blocking asynchronous iterator that suspends the caller coroutine without blocking a thread. You can find a worked-out example with asynchronous sequences in the draft description of the revised coroutines here https://github.com/Kotlin/kotlin-coroutines/blob/revision-2/kotlin-coroutines-informal.md You are also welcome to join #coroutines for further discussion.
👍 2