#include <userver/utils/thread_name.hpp>
RAII helper to run some code with a temporary current thread name.
This might be useful for spawning external library threads if no other customisation points are available. All restrictions for thread name operations apply.
Definition at line 45 of file thread_name.hpp.
Public Member Functions | |
CurrentThreadNameGuard (std::string_view name) | |
Set the name of the current thread in the current scope. | |
CurrentThreadNameGuard (const CurrentThreadNameGuard &)=delete | |
CurrentThreadNameGuard (CurrentThreadNameGuard &&) noexcept=delete | |
CurrentThreadNameGuard & | operator= (const CurrentThreadNameGuard &)=delete |
CurrentThreadNameGuard & | operator= (CurrentThreadNameGuard &&) noexcept=delete |
utils::CurrentThreadNameGuard::CurrentThreadNameGuard | ( | std::string_view | name | ) |
Set the name of the current thread in the current scope.
name | temporary thread name |
std::system_error | on error |