Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
suspend fun t1(): Int {
println("Inside t1() on ${Thread.currentThread().name}")
// Emulate network call
delay(100)
return 1
}
suspend fun t2(param1: Int): String {
println("Inside t2() on ${Thread.currentThread().name}")
// Emulate network call
delay(200)
return "${param1}_".plus("resultT2")
}
suspend fun t3(param2: String): String {
println("Inside t3() on ${Thread.currentThread().name}")
// Emulate network call
delay(200)
return param2.plus("_").plus("resultT3")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment