Skip to content

Instantly share code, notes, and snippets.

@jaozinfs
Created June 7, 2022 19:33
Show Gist options
  • Save jaozinfs/4224b45f9b7e4b69beaa7cb1786a4cc8 to your computer and use it in GitHub Desktop.
Save jaozinfs/4224b45f9b7e4b69beaa7cb1786a4cc8 to your computer and use it in GitHub Desktop.
fun main() = runBlocking {
val job1 = launch {
delay(2000)
downloadData()
print("Completed Job 1")
}
val job2 = launch {
delay(2000)
syncUserDetails()
println("Completed Job 2")
}
joinAll(job1, job2)
println("Finish")
startAnimation()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment