2#ifndef _MDBX_CONTAINERS_TRANSACTION_TRACKER_HPP_INCLUDED
3#define _MDBX_CONTAINERS_TRANSACTION_TRACKER_HPP_INCLUDED
40#ifdef MDBX_CONTAINERS_HEADER_ONLY
Associates MDBX transactions with threads.
MDBX_txn * thread_txn() const
Retrieves the transaction associated with the current thread.
void bind_txn(MDBX_txn *txn)
Registers a transaction for a specific thread.
std::mutex m_mutex
Protects access to m_thread_txns.
std::unordered_map< std::thread::id, MDBX_txn * > m_thread_txns
Map of thread IDs to transaction pointers.
virtual ~TransactionTracker()=default
void unbind_txn()
Unregisters a transaction for a specific thread.