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

explicit TransactionLock(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction)

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:

transactionTransaction to guard.

~TransactionLock()

Destroys the wrapper and releases any held lock.

void lock()

Locks the associated transaction when not already locked.

Exposed as lock() in Python.

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 with usage. Exposed as __enter__() in Python.

void exit(void*, void*, void*)

Python context-manager exit hook.

Exists to support Python with usage. Exposed as __exit__() in Python.

Public Static Functions

static std::shared_ptr<rogue::interfaces::memory::TransactionLock> create(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction)

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 returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters:

transactionTransaction to guard.

Returns:

Shared pointer to the created lock object.

static void setup_python()

Registers this type with Python bindings.