TransactionLock
TransactionLock objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::interfaces::memory::TransactionLock> rogue::interfaces::memory::TransactionLockPtr
Shared pointer alias for
TransactionLock.
The class description is shown below:
-
class TransactionLock
Scoped lock wrapper for a memory transaction.
Holds a lock on transaction data while client code accesses it. The lock prevents transaction destruction while a slave updates data and completion state. Instances are created via
Transaction::lock().Public Functions
Constructs a lock wrapper for the provided transaction.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
transaction – Transaction to guard.
-
~TransactionLock()
Destroys the wrapper and releases any held lock.
-
void unlock()
Unlocks the associated transaction when currently locked.
Exposed as
unlock()in Python.
-
void enter()
Python context-manager entry hook.
Exists to support Python
withusage. Exposed as__enter__()in Python.
-
void exit(void*, void*, void*)
Python context-manager exit hook.
Exists to support Python
withusage. Exposed as__exit__()in Python.
Public Static Functions
Creates a transaction lock wrapper.
Parameter semantics are identical to the constructor; see
TransactionLock()for lock-wrapper behavior details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
transaction – Transaction to guard.
- Returns:
Shared pointer to the created lock object.
-
static void setup_python()
Registers this type with Python bindings.