Electroneum
Loading...
Searching...
No Matches
lmdb::release_read_txn Struct Reference

#include <transaction.h>

Public Member Functions

void operator() (MDB_txn *ptr) const noexcept

Detailed Description

Only valid if used via create_read_txn(). Decrements active count in associated context, and aborts a LMDB transaction (mdb_txn_abort).

Definition at line 54 of file transaction.h.

Member Function Documentation

◆ operator()()

void lmdb::release_read_txn::operator() ( MDB_txn * ptr) const
noexcept

Definition at line 63 of file database.cpp.

64 {
65 if (ptr)
66 {
67 MDB_env* const env = mdb_txn_env(ptr);
68 abort_txn{}(ptr);
69 if (env)
70 {
71 context* ctx = reinterpret_cast<context*>(mdb_env_get_userctx(env));
72 if (ctx)
73 release_context(*ctx);
74 }
75 }
76 }
void * mdb_env_get_userctx(MDB_env *env)
Get the application information associated with the MDB_env.
MDB_env * mdb_txn_env(MDB_txn *txn)
Returns the transaction's MDB_env.
struct MDB_env MDB_env
Opaque structure for a database environment.
Definition lmdb.h:260
std::unique_ptr< void, terminate > context
Unique ZMQ context handle, calls zmq_term on destruction.
Definition zmq.h:98
Here is the call graph for this function:

The documentation for this struct was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/lmdb/transaction.h
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/lmdb/database.cpp