|
SERiF 0.0.1a
3+1D Stellar Structure and Evolution
|
Wrapper for DObject with thread-safe access. More...
#include <LockableDObject.h>
Public Member Functions | |
| LockableDObject ()=default | |
| Default constructor. | |
| DObject & | get () |
| Access the underlying DObject. | |
| void | lock () |
| Locks the mutex to ensure thread-safe access. | |
| void | unlock () |
| Unlocks the mutex after thread-safe access. | |
Private Attributes | |
| DObject | object_ |
| The underlying DObject instance. | |
| std::mutex | mutex_ |
| Mutex for thread-safe access. | |
Wrapper for DObject with thread-safe access.
Definition at line 39 of file LockableDObject.h.
|
default |
Default constructor.
| DObject & LockableDObject::get | ( | ) |
Access the underlying DObject.
Definition at line 26 of file LockableDObject.cpp.
| void LockableDObject::lock | ( | ) |
Locks the mutex to ensure thread-safe access.
Definition at line 33 of file LockableDObject.cpp.
| void LockableDObject::unlock | ( | ) |
Unlocks the mutex after thread-safe access.
Definition at line 40 of file LockableDObject.cpp.
|
private |
Mutex for thread-safe access.
Definition at line 64 of file LockableDObject.h.
|
private |
The underlying DObject instance.
Definition at line 63 of file LockableDObject.h.