mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
6eb33bd0c2
FatalError replaces what previously was the AbortNode function in shutdown.cpp. This commit is part of the libbitcoinkernel project and further removes the shutdown's and, more generally, the kernel library's dependency on interface_ui with a kernel notification method. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. At the same time it also takes a step towards de-globalising the interrupt infrastructure. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: TheCharlatan <seb.kung@gmail.com>
25 lines
827 B
C
25 lines
827 B
C
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
// Copyright (c) 2009-2021 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_SHUTDOWN_H
|
|
#define BITCOIN_SHUTDOWN_H
|
|
|
|
/** Request shutdown of the application. */
|
|
void StartShutdown();
|
|
|
|
/** Clear shutdown flag. Only use this during init (before calling WaitForShutdown in any
|
|
* thread), or in the unit tests. Calling it in other circumstances will cause a race condition.
|
|
*/
|
|
void AbortShutdown();
|
|
|
|
/** Returns true if a shutdown is requested, false otherwise. */
|
|
bool ShutdownRequested();
|
|
|
|
/** Wait for StartShutdown to be called in any thread. This can only be used
|
|
* from a single thread.
|
|
*/
|
|
void WaitForShutdown();
|
|
|
|
#endif // BITCOIN_SHUTDOWN_H
|