Bitcoin Core  21.99.0
P2P Digital Currency
shutdown.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2020 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_SHUTDOWN_H
7 #define BITCOIN_SHUTDOWN_H
8 
9 #include <util/translation.h> // For bilingual_str
10 
12 bool AbortNode(const std::string& strMessage, bilingual_str user_message = bilingual_str{});
13 
17 bool InitShutdownState();
18 
20 void StartShutdown();
21 
25 void AbortShutdown();
26 
28 bool ShutdownRequested();
29 
33 void WaitForShutdown();
34 
35 #endif
StartShutdown
void StartShutdown()
Request shutdown of the application.
Definition: shutdown.cpp:56
bilingual_str
Bilingual messages:
Definition: translation.h:16
InitShutdownState
bool InitShutdownState()
Initialize shutdown state.
Definition: shutdown.cpp:45
AbortNode
bool AbortNode(const std::string &strMessage, bilingual_str user_message=bilingual_str{})
Abort with a message.
Definition: shutdown.cpp:21
translation.h
ShutdownRequested
bool ShutdownRequested()
Returns true if a shutdown is requested, false otherwise.
Definition: shutdown.cpp:87
WaitForShutdown
void WaitForShutdown()
Wait for StartShutdown to be called in any thread.
Definition: shutdown.cpp:92
AbortShutdown
void AbortShutdown()
Clear shutdown flag.
Definition: shutdown.cpp:77