iterator
operator fun <T> Observable<T>.iterator(): ChannelIterator<T>
Deprecated: This iteration operator for for (x in source) { ... }
loop is deprecated, because it leaves code vulnerable to leaving unclosed subscriptions on exception. Use source.consumeEach { x -> ... }
.
Subscribes to this Observable and returns an iterator to receive elements emitted by it.
This is a shortcut for open().iterator()
. See openSubscription if you need an ability to manually
unsubscribe from the observable.