Execute a function, acting as if the function starts with an implicit box.begin() and ends with an implicit box.commit() if successful, or ends with an implicit box.rollback() if there is an error.
Return: the result of the function passed to
atomic()as an argument.
- error and abort the transaction in case of a conflict.
- error if the operation fails to write to disk.
- error if for some reason memory cannot be allocated.