Created
January 30, 2021 18:13
-
-
Save GauravChaddha1996/ee8711b58bb0ae9484fda6686b6726b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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