suspend fun &lt;T&gt; dbTransaction(database: Database, block: () -&gt; T): T = withContext(<Dis...
b
suspend fun <T> dbTransaction(database: Database, block: () -> T): T = withContext(Dispatchers.IO) { transaction(database) { block() } }
j
worth considering that transaction{} will retry up to 3 times by default - that might not be appropriate for your code