mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 01:08:04 +02:00
Introduce Locked#Locked(T)
This commit is contained in:
parent
a85586bc07
commit
73a1a79e9d
@ -48,6 +48,12 @@ template<typename T>
|
||||
class Locked
|
||||
{
|
||||
public:
|
||||
Locked() = default;
|
||||
|
||||
Locked(T desired) : m_Value(std::move(desired))
|
||||
{
|
||||
}
|
||||
|
||||
inline T load() const
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_Mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user