<@U0KBF8D7V> it depends on how you want to use the...
# coroutines
v
@Paul Woitaschek it depends on how you want to use the result and what thread you want it running on if you want to block the thread until the operation is done just wrap the whole thing in
runBlocking
Copy code
runBlocking { 
    println("result is ${api.string(<http://api.int|api.int>())}") 
}
if you don't want to block and you don't care about the result use
launch
Copy code
launch(CommonPool) { 
    println("result is ${api.string(<http://api.int|api.int>())}") 
}
and if you want to use the result later on use
async
Copy code
runBlocking { 
    val result = async(context) {
        return api.string(<http://api.int|api.int>())
    }

    //do something else

    println("result is ${result.await()}")
}