asyncTransaction

suspend fun <T> asyncTransaction(scope: CoroutineScope = GlobalScope, block: Transaction.() -> T): T

Creates a new asynchronous transaction and executes it.

Return

The transaction result as T.

Parameters

scope

The coroutine scope to use to execute the transaction

block

The body to execute in the transaction.