In this recipe, we are going to explore how to work effectively with the JVM Thread class in a clean way using the Kotlin standard library functions dedicated to running threads in a convenient way. We are going to simulate two long-running tasks and execute them in background threads synchronously.