1 // Copyright (c) 2015 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.
5 #ifndef BITCOIN_REVERSELOCK_H
6 #define BITCOIN_REVERSELOCK_H
9 * An RAII-style reverse lock. Unlocks on construction and locks on destruction.
11 template<typename Lock>
16 explicit reverse_lock(Lock& lock) : lock(lock) {
27 reverse_lock(reverse_lock const&);
28 reverse_lock& operator=(reverse_lock const&);
34 #endif // BITCOIN_REVERSELOCK_H