Thread
#exposed
    Vinicius Araujo

    Vinicius Araujo

    1 year ago
    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:
    fun addA() = transaction{A insert statement}
    fun addB() = trabsaction{B insert statement}
    
    suspend fun applyAandB() = coroutineScope {
        launch { addA() }
        launch { addB() }
    }
    would them execute asyncronously?
    Vinicius Araujo

    Vinicius Araujo

    1 year ago
    Yes but the example they give there is asynchronous transaction inside a transaction block, my question is about separated transactions blocks being called asynchronously
    tapac

    tapac

    1 year ago
    If your scope uses Dispatcher with multiple threads then transactions will be executed in parallel.
    Vinicius Araujo

    Vinicius Araujo

    1 year ago
    thanks!