diff --git a/BasicApp_8cpp_source.html b/BasicApp_8cpp_source.html
index c2f0a6a238..aeb75b0648 100644
--- a/BasicApp_8cpp_source.html
+++ b/BasicApp_8cpp_source.html
@@ -120,7 +120,7 @@ $(document).ready(function() { init_codefold(0); });
std::optional< boost::asio::executor_work_guard< boost::asio::io_context::executor_type > > work_
T emplace_back(T... args)
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
diff --git a/CurrentThreadName_8cpp_source.html b/CurrentThreadName_8cpp_source.html
index e0bb8c46dc..c5bc565ae8 100644
--- a/CurrentThreadName_8cpp_source.html
+++ b/CurrentThreadName_8cpp_source.html
@@ -83,122 +83,144 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpl/beast/core/CurrentThreadName.h>
-
3#include <boost/predef.h>
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
19#if DEBUG && BOOST_COMP_MSVC
-
-
-
-
-
-
-
26 struct THREADNAME_INFO
-
-
-
-
-
-
-
+
+
+
+
17#if DEBUG && BOOST_COMP_MSVC
+
+
+
+
+
+
+
24 struct THREADNAME_INFO
+
+
+
+
+
+
+
+
+
-
-
-
-
38 ni.szName = name.
data();
-
39 ni.dwThreadID = GetCurrentThreadId();
-
-
-
-
43#pragma warning(disable : 6320 6322)
-
-
-
-
47 0x406d1388, 0,
sizeof(ni) /
sizeof(ULONG_PTR), (ULONG_PTR*)&ni);
-
-
49 __except (EXCEPTION_CONTINUE_EXECUTION)
-
-
-
-
-
-
-
-
-
-
-
+
+
36 ni.szName = name.
data();
+
37 ni.dwThreadID = GetCurrentThreadId();
+
+
+
+
41#pragma warning(disable : 6320 6322)
+
+
+
+
45 0x406d1388, 0,
sizeof(ni) /
sizeof(ULONG_PTR), (ULONG_PTR*)&ni);
+
+
47 __except (EXCEPTION_CONTINUE_EXECUTION)
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
67 pthread_setname_np(name.
data());
-
-
-
-
-
-
-
+
+
+
+
65 pthread_setname_np(name.
data());
+
+
+
+
+
+
+
+
+
-
81 pthread_setname_np(pthread_self(), name.
data());
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
82 char boundedName[maxThreadNameLength + 1];
+
+
+
+
+
87 static_cast<int>(maxThreadNameLength),
+
+
+
90 pthread_setname_np(pthread_self(), boundedName);
+
+
92#ifdef TRUNCATED_THREAD_NAME_LOGS
+
93 if (name.
size() > maxThreadNameLength)
+
+
95 std::cerr <<
"WARNING: Thread name \"" << name <<
"\" (length "
+
96 << name.
size() <<
") exceeds maximum of "
+
97 << maxThreadNameLength <<
" characters on Linux.\n";
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
103 detail::setCurrentThreadNameImpl(name);
-
+
+
+
+
+
+
+
121 detail::setCurrentThreadNameImpl(name);
+
-
-
+
+
+
+
+
-
thread_local std::string threadName
+
thread_local std::string threadName
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
-
std::string getCurrentThreadName()
Returns the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
std::string getCurrentThreadName()
Returns the name of the caller thread.
+
diff --git a/CurrentThreadName_8h_source.html b/CurrentThreadName_8h_source.html
index 5b1a0f6e98..d7a47a5704 100644
--- a/CurrentThreadName_8h_source.html
+++ b/CurrentThreadName_8h_source.html
@@ -88,25 +88,46 @@ $(document).ready(function() { init_codefold(0); });
5#ifndef BEAST_CORE_CURRENT_THREAD_NAME_H_INCLUDED
6#define BEAST_CORE_CURRENT_THREAD_NAME_H_INCLUDED
-
-
-
-
+
8#include <boost/predef.h>
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
34template <std::
size_t N>
+
+
+
+
+
39 N <= maxThreadNameLength + 1,
+
40 "Thread name cannot exceed 15 characters");
+
+
+
+
+
+
+
+
+
+
+
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
-
std::string getCurrentThreadName()
Returns the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
std::string getCurrentThreadName()
Returns the name of the caller thread.
+
diff --git a/Database_8cpp_source.html b/Database_8cpp_source.html
index ac67032ddc..24c9d7d582 100644
--- a/Database_8cpp_source.html
+++ b/Database_8cpp_source.html
@@ -419,7 +419,7 @@ $(document).ready(function() { init_codefold(0); });
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
void read(nudb::detail::istream &is, std::size_t &u)
diff --git a/GRPCServer_8cpp_source.html b/GRPCServer_8cpp_source.html
index 1957b598c4..7fc34efd40 100644
--- a/GRPCServer_8cpp_source.html
+++ b/GRPCServer_8cpp_source.html
@@ -822,7 +822,7 @@ $(document).ready(function() { init_codefold(0); });
boost::asio::ip::tcp::endpoint to_asio_endpoint(Endpoint const &endpoint)
Convert to asio::ip::tcp::endpoint.
Endpoint from_asio(boost::asio::ip::address const &address)
Convert to Endpoint.
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
diff --git a/Job_8cpp_source.html b/Job_8cpp_source.html
index 4bfc390ed3..53788aabb5 100644
--- a/Job_8cpp_source.html
+++ b/Job_8cpp_source.html
@@ -224,7 +224,7 @@ $(document).ready(function() { init_codefold(0); });
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
diff --git a/LedgerCleaner_8cpp_source.html b/LedgerCleaner_8cpp_source.html
index 8f65c1876d..55bec17460 100644
--- a/LedgerCleaner_8cpp_source.html
+++ b/LedgerCleaner_8cpp_source.html
@@ -600,7 +600,7 @@ $(document).ready(function() { init_codefold(0); });
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
std::unique_ptr< LedgerCleaner > make_LedgerCleaner(Application &app, beast::Journal journal)
diff --git a/LoadManager_8cpp_source.html b/LoadManager_8cpp_source.html
index a035dcb525..ab60259836 100644
--- a/LoadManager_8cpp_source.html
+++ b/LoadManager_8cpp_source.html
@@ -317,7 +317,7 @@ $(document).ready(function() { init_codefold(0); });
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
diff --git a/Main_8cpp_source.html b/Main_8cpp_source.html
index 58a15ef58a..47cffaaaed 100644
--- a/Main_8cpp_source.html
+++ b/Main_8cpp_source.html
@@ -986,7 +986,7 @@ $(document).ready(function() { init_codefold(0); });
Severity
Severity level / threshold of a Journal message.
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
std::string const & getVersionString()
Server version.
int fromCommandLine(Config const &config, std::vector< std::string > const &vCmd, Logs &logs)
diff --git a/PerfLogImp_8cpp_source.html b/PerfLogImp_8cpp_source.html
index 420b06aab7..dcf898155d 100644
--- a/PerfLogImp_8cpp_source.html
+++ b/PerfLogImp_8cpp_source.html
@@ -691,7 +691,7 @@ $(document).ready(function() { init_codefold(0); });
@ arrayValue
array value (ordered list)
@ objectValue
object value (collection of name/value pairs).
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
std::unique_ptr< PerfLog > make_PerfLog(PerfLog::Setup const &setup, Application &app, beast::Journal journal, std::function< void()> &&signalStop)
PerfLog::Setup setup_PerfLog(Section const §ion, boost::filesystem::path const &configDir)
diff --git a/ResourceManager_8cpp_source.html b/ResourceManager_8cpp_source.html
index 18ad7faa46..89c16de6bc 100644
--- a/ResourceManager_8cpp_source.html
+++ b/ResourceManager_8cpp_source.html
@@ -247,7 +247,7 @@ $(document).ready(function() { init_codefold(0); });
-
+
@@ -337,7 +337,7 @@ $(document).ready(function() { init_codefold(0); });
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
std::unique_ptr< Manager > make_Manager(beast::insight::Collector::ptr const &collector, beast::Journal journal)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Stopwatch & stopwatch()
Returns an instance of a wall clock.
diff --git a/RocksDBFactory_8cpp_source.html b/RocksDBFactory_8cpp_source.html
index 1e42a56225..d904dd9362 100644
--- a/RocksDBFactory_8cpp_source.html
+++ b/RocksDBFactory_8cpp_source.html
@@ -572,7 +572,7 @@ $(document).ready(function() { init_codefold(0); });
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Status
Return codes from Backend operations.
diff --git a/SHAMapStoreImp_8cpp_source.html b/SHAMapStoreImp_8cpp_source.html
index f8b2f38e98..3731abb3f2 100644
--- a/SHAMapStoreImp_8cpp_source.html
+++ b/SHAMapStoreImp_8cpp_source.html
@@ -923,7 +923,7 @@ $(document).ready(function() { init_codefold(0); });
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
diff --git a/Workers_8cpp_source.html b/Workers_8cpp_source.html
index f52374f301..b25819067f 100644
--- a/Workers_8cpp_source.html
+++ b/Workers_8cpp_source.html
@@ -403,7 +403,7 @@ $(document).ready(function() { init_codefold(0); });
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Called to perform tasks as needed.
diff --git a/beast__CurrentThreadName__test_8cpp_source.html b/beast__CurrentThreadName__test_8cpp_source.html
index bfd870bc55..c2bf762c87 100644
--- a/beast__CurrentThreadName__test_8cpp_source.html
+++ b/beast__CurrentThreadName__test_8cpp_source.html
@@ -84,92 +84,132 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpl/beast/core/CurrentThreadName.h>
2#include <xrpl/beast/unit_test.h>
-
+
4#include <boost/predef/os.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
28 if (!initialThreadName.empty())
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
30 if (!initialThreadName.empty())
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
53 char actualName[beast::maxThreadNameLength + 1] = {};
+
54 pthread_getname_np(pthread_self(), actualName,
sizeof(actualName));
-
-
57 while (stateA == 0 || stateB == 0)
-
-
-
-
-
-
-
-
65 BEAST_EXPECT(stateA == 2);
-
66 BEAST_EXPECT(stateB == 2);
-
-
-
-
-
-
+
56 BEAST_EXPECT(
std::string(actualName) == expectedName);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
79 while (stateA == 0 || stateB == 0)
+
+
+
+
+
+
+
+
87 BEAST_EXPECT(stateA == 2);
+
88 BEAST_EXPECT(stateB == 2);
+
+
+
+
+
+
+
+
+
+
+
99 "1234567890123456",
"123456789012345");
+
+
101 "ThisIsAVeryLongThreadNameExceedingLimit",
+
+
+
104 testName(
"short",
"short");
+
+
+
+
+
+
+
+
+
+
+
-
-
static void exerciseName(std::string myName, std::atomic< bool > *stop, std::atomic< int > *state)
-
void run() override
Runs the suite.
+
+
static void exerciseName(std::string myName, std::atomic< bool > *stop, std::atomic< int > *state)
+
void run() override
Runs the suite.
-
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
-
std::string getCurrentThreadName()
Returns the name of the caller thread.
+
void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+
std::string getCurrentThreadName()
Returns the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
diff --git a/classxrpl_1_1test_1_1CurrentThreadName__test.html b/classxrpl_1_1test_1_1CurrentThreadName__test.html
index efb40d9e1d..0e31db89d8 100644
--- a/classxrpl_1_1test_1_1CurrentThreadName__test.html
+++ b/classxrpl_1_1test_1_1CurrentThreadName__test.html
@@ -242,7 +242,7 @@ Private Attributes
◆ exerciseName()
@@ -284,7 +284,7 @@ Private Attributes
@@ -315,7 +315,7 @@ Private Attributes
Implements beast::unit_test::suite.
-Definition at line 43 of file beast_CurrentThreadName_test.cpp.
+Definition at line 64 of file beast_CurrentThreadName_test.cpp.
diff --git a/namespacebeast.html b/namespacebeast.html
index b40bfae8d0..2d9716fc60 100644
--- a/namespacebeast.html
+++ b/namespacebeast.html
@@ -987,7 +987,7 @@ template<bool IsMulti, bool IsMap, class Key , class T , class Clock , class
Changes the name of the caller thread.
Different OSes may place different length or content limits on this name.
-Definition at line 100 of file CurrentThreadName.cpp.
+Definition at line 118 of file CurrentThreadName.cpp.
@@ -1010,7 +1010,7 @@ template<bool IsMulti, bool IsMap, class Key , class T , class Clock , class
The name returned is the name as set by a call to setCurrentThreadName(). If the thread name is set by an external force, then that name change will not be reported.
If no name has ever been set, then the empty string is returned.
-Definition at line 94 of file CurrentThreadName.cpp.
+Definition at line 112 of file CurrentThreadName.cpp.
diff --git a/namespacebeast_1_1detail.html b/namespacebeast_1_1detail.html
index 0275bcccd3..8dc9b90371 100644
--- a/namespacebeast_1_1detail.html
+++ b/namespacebeast_1_1detail.html
@@ -440,7 +440,7 @@ template<typename T >
diff --git a/short__read__test_8cpp_source.html b/short__read__test_8cpp_source.html
index 7c0ca6402c..710187543b 100644
--- a/short__read__test_8cpp_source.html
+++ b/short__read__test_8cpp_source.html
@@ -881,7 +881,7 @@ $(document).ready(function() { init_codefold(0); });
-void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
+void setCurrentThreadName(std::string_view newThreadName)
Changes the name of the caller thread.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.