Working with kotlin coroutines?

Coroutines are Kotlin's way of writing asynchronous, non-blocking code. They simplify async programming by making it look more like regular synchronous code. Here's a basic coroutine example:


  import kotlinx.coroutines.*
  
  fun main() = runBlocking {
      launch {
          delay(1000L)
          println("World!")
      }
      println("Hello,")
  }
  

Beginner's Guide to Kotlin