#pragma once #include #include namespace NYT { //////////////////////////////////////////////////////////////////////////////// struct TThreadName { TThreadName() = default; TThreadName(TStringBuf name); TStringBuf ToStringBuf() const; static constexpr int BufferCapacity = 16; // including zero terminator std::array Buffer{}; // zero-terminated int Length = 0; // not including zero terminator }; TThreadName GetCurrentThreadName(); //////////////////////////////////////////////////////////////////////////////// } // namespace NYT