1#include <xrpl/beast/core/CurrentThreadName.h>
3#include <boost/predef.h>
19#if DEBUG && BOOST_COMP_MSVC
26 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)
67 pthread_setname_np(name.
data());
81 pthread_setname_np(pthread_self(), name.
data());
103 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.