Function stim::atomically[src]
pub fn atomically<R>(f: |&Transaction| -> R) -> R
Perform transaction
Performs the transaction represented by the provided closure. If a transaction is already in progress on the current task, it is executed as a sub-transaction.
The closure is passed a handle to the transaction which can be used to control it and borrow variables.