Why do we need Kotlin Coroutine?

Coroutine:


GlobalScope.launch() {
	   println("Hi")
     delay(1000)
    }
}

// use $Thread.currentThread().name to get the current thread.
// Globalscope is a companion object

Suspending Functions:

Coroutine Builders:

RunBlocking:

fun myFirstTest() = runBlocking{ 
	myOwnSuspendFunction()
}