|
qxLib
|
A class that provides thread-safe access to an object, including construction and destruction. More...
#include <threads_shared.h>
Public Member Functions | |
| template<class... args_t> | |
| threads_shared (args_t &&... args) | |
| threads_shared object constructor More... | |
| ~threads_shared () | |
| threads_shared object destructor | |
| proxy | lock () |
| Wait for other threads to finish work with data object and retrieve proxy object. More... | |
| std::optional< proxy > | try_lock () |
| Try to lock synchronization primitive and get proxy. More... | |
A class that provides thread-safe access to an object, including construction and destruction.
| data_t | - data type |
| synchronization_primitive_t | - synchronization primitive type |
Definition at line 81 of file threads_shared.h.
|
inline |
threads_shared object constructor
| args_t | - template parameter pack type |
| args | - arguments to constructing Data object |
Definition at line 115 of file threads_shared.inl.
|
inline |
Wait for other threads to finish work with data object and retrieve proxy object.
Definition at line 135 of file threads_shared.inl.
|
inline |
Try to lock synchronization primitive and get proxy.
Definition at line 143 of file threads_shared.inl.