exclusive

abstract suspend fun <T> exclusive(block: suspend () -> T): T

Runs block exclusively of every other operation on this storage (other rotation steps and every storage transaction). Throws IllegalStateException if called inside a storage transaction. block runs outside any transaction, because it calls the key provider.