Kotlin Coroutine

What is a Coroutine?

What is actually a Coroutine?

Guowei Lv

2 minute read

The first question we should ask when learning Kotlin Coroutine is: what is a Coroutine after all? Let’s go back to the Thread world and ask the same question, what is a Thread? Here is code that will create a simple Thread and start it: val thread = thread { } So the answer seems obvious, a Thread is just the Thread object returned. Easy. Can we say the same in the Coroutine world?