Skip to content

Instantly share code, notes, and snippets.

View djodjoni's full-sized avatar

Kalin Maldzhanski djodjoni

View GitHub Profile
@elizarov
elizarov / Example.kt
Last active September 21, 2019 16:15
// https://akarnokd.blogspot.ru/2017/09/rxjava-vs-kotlin-coroutines-quick-look.html
import kotlinx.coroutines.experimental.*
suspend fun f1(i: Int): Int {
Thread.sleep(if (i != 2) 2000L else 200L)
return 1
}
suspend fun f2(i: Int): Int {
Thread.sleep(if (i != 2) 2000L else 200L)