24#include <xrpl/beast/core/CurrentThreadName.h>
26#include <boost/predef.h>
42#if DEBUG && BOOST_COMP_MSVC
49 struct THREADNAME_INFO
61 ni.szName = name.
data();
62 ni.dwThreadID = GetCurrentThreadId();
66#pragma warning(disable : 6320 6322)
70 0x406d1388, 0,
sizeof(ni) /
sizeof(ULONG_PTR), (ULONG_PTR*)&ni);
72 __except (EXCEPTION_CONTINUE_EXECUTION)
90 pthread_setname_np(name.
data());
104 pthread_setname_np(pthread_self(), name.
data());
126 detail::setCurrentThreadNameImpl(name);
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.