![]() |
Bitcoin Core 22.99.0
P2P Digital Currency
|
#include <shutdown.h>#include <logging.h>#include <node/ui_interface.h>#include <util/tokenpipe.h>#include <warnings.h>#include <config/bitcoin-config.h>#include <assert.h>#include <atomic>Go to the source code of this file.
Functions | |
| bool | AbortNode (const std::string &strMessage, bilingual_str user_message) |
| Abort with a message. More... | |
| static std::atomic< bool > | fRequestShutdown (false) |
| bool | InitShutdownState () |
| Initialize shutdown state. More... | |
| void | StartShutdown () |
| Request shutdown of the application. More... | |
| void | AbortShutdown () |
| Clear shutdown flag. More... | |
| bool | ShutdownRequested () |
| Returns true if a shutdown is requested, false otherwise. More... | |
| void | WaitForShutdown () |
| Wait for StartShutdown to be called in any thread. More... | |
Variables | |
| static TokenPipeEnd | g_shutdown_r |
| On UNIX-like operating systems use the self-pipe trick. More... | |
| static TokenPipeEnd | g_shutdown_w |
| bool AbortNode | ( | const std::string & | strMessage, |
| bilingual_str | user_message | ||
| ) |
Abort with a message.
Definition at line 21 of file shutdown.cpp.
| void AbortShutdown | ( | ) |
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.
Definition at line 77 of file shutdown.cpp.
|
static |
| bool InitShutdownState | ( | ) |
Initialize shutdown state.
This must be called before using either StartShutdown(), AbortShutdown() or WaitForShutdown(). Calling ShutdownRequested() is always safe.
Definition at line 45 of file shutdown.cpp.
| bool ShutdownRequested | ( | ) |
Returns true if a shutdown is requested, false otherwise.
Definition at line 87 of file shutdown.cpp.
| void StartShutdown | ( | ) |
Request shutdown of the application.
Definition at line 56 of file shutdown.cpp.
| void WaitForShutdown | ( | ) |
Wait for StartShutdown to be called in any thread.
This can only be used from a single thread.
Definition at line 92 of file shutdown.cpp.
|
static |
On UNIX-like operating systems use the self-pipe trick.
Definition at line 41 of file shutdown.cpp.
|
static |
Definition at line 42 of file shutdown.cpp.