Routine vs Coroutine - Thread Kotlin

PHOTO EMBED

Wed Apr 07 2021 10:19:44 GMT+0000 (Coordinated Universal Time)

Saved by @GoodRequest.

fun main() {
    println("main starts")
    thread { routine(1, 500) }
    thread { routine(2, 300) }
    Thread.sleep(600)
    println("main ends")
}
content_copyCOPY