Derecho
0.9
Distributed systems toolkit for RDMA
include
derecho
core
detail
locked_reference.hpp
Go to the documentation of this file.
1
7
#pragma once
8
9
#include <mutex>
10
11
namespace
derecho
{
12
19
template
<
typename
LockType,
typename
T>
20
class
LockedReference
{
21
private
:
22
T&
reference
;
23
LockType
lock
;
24
25
public
:
26
LockedReference
(T& real_reference,
typename
LockType::mutex_type& mutex)
27
: reference(real_reference), lock(mutex) {}
28
29
T&
get
() {
30
return
reference
;
31
}
32
};
33
}
// namespace derecho
derecho::LockedReference
A little helper class that wraps together a reference and a lock on a related mutex.
Definition:
locked_reference.hpp:20
derecho::LockedReference::lock
LockType lock
Definition:
locked_reference.hpp:23
derecho
Definition:
git_version.cpp:30
derecho::LockedReference::LockedReference
LockedReference(T &real_reference, typename LockType::mutex_type &mutex)
Definition:
locked_reference.hpp:26
derecho::LockedReference::reference
T & reference
Definition:
locked_reference.hpp:22
Generated on Sat Oct 26 2019 22:02:38 for Derecho by
1.8.13