24#include <xrpl/beast/core/CurrentThreadName.h>
25#include <boost/predef.h>
38#if DEBUG && BOOST_COMP_MSVC
45 struct THREADNAME_INFO
57 ni.szName = name.
data();
58 ni.dwThreadID = GetCurrentThreadId();
62#pragma warning(disable : 6320 6322)
66 0x406d1388, 0,
sizeof(ni) /
sizeof(ULONG_PTR), (ULONG_PTR*)&ni);
68 __except (EXCEPTION_CONTINUE_EXECUTION)
86 pthread_setname_np(name.
data());
100 pthread_setname_np(pthread_self(), name.
data());
122 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.