Fabcoin Core
0.16.2
P2P Digital Currency
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
reverselock.h
Go to the documentation of this file.
1
// Copyright (c) 2015-2017 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef FABCOIN_REVERSELOCK_H
6
#define FABCOIN_REVERSELOCK_H
7
11
template
<
typename
Lock>
12
class
reverse_lock
13
{
14
public
:
15
16
explicit
reverse_lock
(Lock& _lock) :
lock
(_lock) {
17
_lock.unlock();
18
_lock.swap(
templock
);
19
}
20
21
~reverse_lock
() {
22
templock
.lock();
23
templock
.swap(
lock
);
24
}
25
26
private
:
27
reverse_lock
(
reverse_lock
const
&);
28
reverse_lock
&
operator=
(
reverse_lock
const
&);
29
30
Lock&
lock
;
31
Lock
templock
;
32
};
33
34
#endif // FABCOIN_REVERSELOCK_H
reverse_lock::operator=
reverse_lock & operator=(reverse_lock const &)
reverse_lock::lock
Lock & lock
Definition:
reverselock.h:30
reverse_lock::templock
Lock templock
Definition:
reverselock.h:31
reverse_lock::reverse_lock
reverse_lock(Lock &_lock)
Definition:
reverselock.h:16
reverse_lock
An RAII-style reverse lock.
Definition:
reverselock.h:12
reverse_lock::~reverse_lock
~reverse_lock()
Definition:
reverselock.h:21
Generated on Mon Oct 22 2018 15:15:39 for Fabcoin Core by
1.8.11