Good night! It may be a getting started coroutine ...
# exposed
v
Good night! It may be a getting started coroutine question, but since its subject is strictly related to exposed, maybe someone can help me with an expecifc use case insight. So if I do it like this:
Copy code
fun addA() = transaction{A insert statement}
fun addB() = trabsaction{B insert statement}

suspend fun applyAandB() = coroutineScope {
    launch { addA() }
    launch { addB() }
}
would them execute asyncronously?
v
Yes but the example they give there is asynchronous transaction inside a transaction block, my question is about separated transactions blocks being called asynchronously
t
If your scope uses Dispatcher with multiple threads then transactions will be executed in parallel.
v
thanks!