Changeset View
Changeset View
Standalone View
Standalone View
src/threadinterrupt.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "threadinterrupt.h" | #include <threadinterrupt.h> | ||||
#include "sync.h" | #include <sync.h> | ||||
CThreadInterrupt::operator bool() const { | CThreadInterrupt::operator bool() const { | ||||
return flag.load(std::memory_order_acquire); | return flag.load(std::memory_order_acquire); | ||||
} | } | ||||
void CThreadInterrupt::reset() { | void CThreadInterrupt::reset() { | ||||
flag.store(false, std::memory_order_release); | flag.store(false, std::memory_order_release); | ||||
} | } | ||||
Show All 25 Lines |