Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Functions
shutdown.h File Reference
#include <util/translation.h>
Include dependency graph for shutdown.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool AbortNode (const std::string &strMessage, bilingual_str user_message=bilingual_str{})
 Abort with a message.
 
bool InitShutdownState ()
 Initialize shutdown state.
 
void StartShutdown ()
 Request shutdown of the application.
 
void AbortShutdown ()
 Clear shutdown flag.
 
bool ShutdownRequested ()
 Returns true if a shutdown is requested, false otherwise.
 
void WaitForShutdown ()
 Wait for StartShutdown to be called in any thread.
 

Function Documentation

◆ AbortNode()

bool AbortNode ( const std::string &  strMessage,
bilingual_str  user_message = bilingual_str{} 
)

Abort with a message.

Definition at line 20 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AbortShutdown()

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 76 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitShutdownState()

bool InitShutdownState ( )

Initialize shutdown state.

This must be called before using either StartShutdown(), AbortShutdown() or WaitForShutdown(). Calling ShutdownRequested() is always safe.

Definition at line 43 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShutdownRequested()

bool ShutdownRequested ( )

Returns true if a shutdown is requested, false otherwise.

Definition at line 85 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartShutdown()

void StartShutdown ( )

Request shutdown of the application.

Definition at line 55 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaitForShutdown()

void WaitForShutdown ( )

Wait for StartShutdown to be called in any thread.

This can only be used from a single thread.

Definition at line 89 of file shutdown.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: