std/io/transaction¶
module io.transaction for Transaction
The control calls of a transaction scope's handle, tx, bound by
with transaction tx on participants { … } (module io): each ends the
attempt and gives no value, so it stands where any type is expected and
nothing after it runs. A block that reaches its end commits with its
final value, so a scope needs none of them. In the prelude.
commit— Ends the attempt by committing it, withvalueas the scope'sok.rollback— Ends the attempt by rolling it back, withreasonin the scope'serr, itskind"rolled_back".retry— Ends the attempt by rolling it back and runs the block again on a fresh transaction, as the next attempt, while the scope'sattemptsremain; with none remaining the scope'serrhas thekind"exhausted".