mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-29 15:05:50 +00:00
Remove beast::Thread (RIPD-1189):
All uses of beast::Thread were previously removed from the code base, so beast::Thread is removed. One piece of beast::Thread needed to be preserved: the ability to set the current thread's name. So there's now a beast::CurrentThreadName that allows the current thread's name to be set and returned. Thread naming is also cleaned up a bit. ThreadName.h and .cpp are removed since beast::CurrentThreadName does a better job. ThreadEntry is also removed, but its terminateHandler() is preserved in TerminateHandler.cpp. The revised terminateHandler() uses beast::CurrentThreadName to recover the name of the running thread. Finally, the NO_LOG_UNHANDLED_EXCEPTIONS #define is removed since it was discovered that the MacOS debugger preserves the stack of the original throw even if the terminateHandler() rethrows.
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
#include <ripple/app/ledger/InboundLedgers.h>
|
||||
#include <ripple/app/ledger/LedgerMaster.h>
|
||||
#include <ripple/app/misc/LoadFeeTrack.h>
|
||||
#include <ripple/core/ThreadEntry.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/beast/core/Thread.h>
|
||||
#include <ripple/beast/core/CurrentThreadName.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace detail {
|
||||
@@ -243,13 +242,7 @@ private:
|
||||
|
||||
void run ()
|
||||
{
|
||||
threadEntry (
|
||||
this, &LedgerCleanerImp::runImpl, "LedgerCleanerImp::run()");
|
||||
}
|
||||
|
||||
void runImpl ()
|
||||
{
|
||||
beast::Thread::setCurrentThreadName ("LedgerCleaner");
|
||||
beast::setCurrentThreadName ("LedgerCleaner");
|
||||
JLOG (j_.debug()) << "Started";
|
||||
|
||||
init();
|
||||
|
||||
Reference in New Issue
Block a user