Revert ThreadName due to problems on Windows (#4702)

* Revert "Remove CurrentThreadName.h from RippledCore.cmake (#4697)"

This reverts commit 3b5fcd587313f5ebc762bc21c6a4ec3e6c275e83.

* Revert "Introduce replacement for getting and setting thread name: (#4312)"

This reverts commit 36cb5f90e233f975eb3f80d819b2fbadab0a9387.
This commit is contained in:
Howard Hinnant
2023-09-14 16:16:50 -04:00
committed by tequ
parent f2dc0b8cc1
commit 8159b0f0ff
21 changed files with 207 additions and 207 deletions

View File

@@ -18,7 +18,7 @@
//==============================================================================
#include <ripple/basics/PerfLog.h>
#include <ripple/basics/ThreadUtilities.h>
#include <ripple/beast/core/CurrentThreadName.h>
#include <ripple/core/impl/Workers.h>
#include <cassert>
@@ -206,7 +206,7 @@ Workers::Worker::run()
for (;;)
{
// Put the name back in case the callback changed it
this_thread::set_name(threadName_);
beast::setCurrentThreadName(threadName_);
// Acquire a task or "internal task."
//
@@ -259,7 +259,7 @@ Workers::Worker::run()
}
// Set inactive thread name.
this_thread::set_name("(" + threadName_ + ")");
beast::setCurrentThreadName("(" + threadName_ + ")");
// [1] We will be here when the paused list is popped
//