mdbx++: добавление txn::make_broken().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2025-01-02 11:15:19 +03:00
parent 1bf008ac16
commit 0a364aefbb
2 changed files with 6 additions and 1 deletions

2
mdbx.h
View File

@ -4235,7 +4235,7 @@ LIBMDBX_INLINE_API(int, mdbx_txn_commit, (MDBX_txn * txn)) { return mdbx_txn_com
* \retval MDBX_EINVAL Transaction handle is NULL. */
LIBMDBX_API int mdbx_txn_abort(MDBX_txn *txn);
/** \brief Marks transaction as broken.
/** \brief Marks transaction as broken to prevent further operations.
* \ingroup c_transactions
*
* Function keeps the transaction handle and corresponding locks, but makes

View File

@ -3799,6 +3799,9 @@ public:
/// \brief Renew read-only transaction.
inline void renew_reading();
/// \brief Marks transaction as broken to prevent further operations.
inline void make_broken();
/// \brief Park read-only transaction.
inline void park_reading(bool autounpark = true);
@ -5578,6 +5581,8 @@ inline uint64_t txn::id() const {
inline void txn::reset_reading() { error::success_or_throw(::mdbx_txn_reset(handle_)); }
inline void txn::make_broken() { error::success_or_throw(::mdbx_txn_break(handle_)); }
inline void txn::renew_reading() { error::success_or_throw(::mdbx_txn_renew(handle_)); }
inline void txn::park_reading(bool autounpark) { error::success_or_throw(::mdbx_txn_park(handle_, autounpark)); }