Add RIPPLE_APPLICATION_CLEAN_EXIT option to BeastConfig.h

This commit is contained in:
Vinnie Falco
2013-09-09 13:42:49 -07:00
parent 3c23699a87
commit c063b940bb
2 changed files with 8 additions and 3 deletions

View File

@@ -164,4 +164,10 @@
#define RIPPLE_USE_NEW_VALIDATORS 0 #define RIPPLE_USE_NEW_VALIDATORS 0
#endif #endif
// Turning this on makes the Application object get destroyed,
// which is part of an attempt to have a "clean exit."
#ifndef RIPPLE_APPLICATION_CLEAN_EXIT
#define RIPPLE_APPLICATION_CLEAN_EXIT 0
#endif
#endif #endif

View File

@@ -141,7 +141,7 @@ public:
// VFALCO NOTE Change this to control whether or not the Application // VFALCO NOTE Change this to control whether or not the Application
// object is destroyed on exit // object is destroyed on exit
// //
#if 1 #if RIPPLE_APPLICATION_CLEAN_EXIT
// Application object will be deleted on exit. If the code doesn't exit // Application object will be deleted on exit. If the code doesn't exit
// cleanly this could cause hangs or crashes on exit. // cleanly this could cause hangs or crashes on exit.
// //
@@ -149,9 +149,8 @@ public:
#else #else
// This will make it so that the Application object is not deleted on exit. // This will make it so that the Application object is not deleted on exit.
// //
: SharedSingleton <Application> (SingletonLifetime::neverDestroyed) : SharedSingleton <ApplicationImp> (SingletonLifetime::neverDestroyed)
#endif #endif
, mMasterLock (this, "MasterLock", __FILE__, __LINE__)
, m_mainService ("io", , m_mainService ("io",
(getConfig ().NODE_SIZE >= 2) ? 2 : 1, (getConfig ().NODE_SIZE >= 2) ? 2 : 1,
(getConfig ().NODE_SIZE >= 2) ? 1 : 0) (getConfig ().NODE_SIZE >= 2) ? 1 : 0)