1 /* 2 * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 // This file was automatically generated from coroutines-guide-reactive.md by Knit tool. Do not edit. 6 package kotlinx.coroutines.rx2.guide.basic04 7 8 import io.reactivex.* 9 import kotlinx.coroutines.* 10 import kotlinx.coroutines.reactive.* 11 import kotlin.coroutines.* 12 <lambda>null13fun main() = runBlocking<Unit> { 14 val source = Flowable.range(1, 5) // a range of five numbers 15 .doOnSubscribe { println("OnSubscribe") } // provide some insight 16 .doOnComplete { println("OnComplete") } // ... 17 .doFinally { println("Finally") } // ... into what's going on 18 // collect the source fully 19 source.collect { println(it) } 20 } 21