<@U3U3P3GCT> This is the code I’m playing with: ``...
# coroutines
i
@nekoinemo This is the code I’m playing with:
Copy code
fun inBackground(doWork: suspend () -> Unit) {
    launch(CommonPool) {
        try {
            doWork()
        } catch (t: Throwable) {
            // Do Logging, rethrow, ...
        }
    }
}

fun main(args: Array<String>) {
    inBackground {
        println("before delay")
        delay(100)
        println("after delay")
    }
    Thread.sleep(100000)
}