1
0
Fork 0

stop monitor on shutdown

This commit is contained in:
Frank Celler 2016-02-22 22:33:41 +01:00
parent 319a19434c
commit 75d464ab8b
3 changed files with 6 additions and 7 deletions

View File

@ -826,6 +826,7 @@ void ArangoServer::buildApplicationServer() {
}
int ArangoServer::startupServer() {
InitializeWorkMonitor();
TRI_InitializeStatistics();
OperationMode::server_operation_mode_e mode =
@ -1174,12 +1175,6 @@ int ArangoServer::startupServer() {
}
// .............................................................................
// start the work monitor
// .............................................................................
InitializeWorkMonitor();
// .............................................................................
// start the main event loop
// .............................................................................

View File

@ -204,6 +204,7 @@ static inline uint32_t TRI_64to32(uint64_t x) {
#define FATAL_ERROR_EXIT(...) \
do { \
std::abort(); \
std::string bt; \
TRI_GetBacktrace(bt); \
if (!bt.empty()) { \

View File

@ -601,4 +601,7 @@ void arangodb::InitializeWorkMonitor() {
/// @brief stops the work monitor
////////////////////////////////////////////////////////////////////////////////
void arangodb::ShutdownWorkMonitor() { WORK_MONITOR.beginShutdown(); }
void arangodb::ShutdownWorkMonitor() {
WORK_MONITOR_STOPPED.store(true);
WORK_MONITOR.beginShutdown();
}