diff options
| author | Stefan Boberg <[email protected]> | 2026-04-13 14:05:03 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-13 14:05:03 +0200 |
| commit | c49e5b15e0f86080d7d33e4e31aecfb701f8f96f (patch) | |
| tree | ff41dcec20502c0cc4cf853222273f50d025cda3 /src/zencore/thread.cpp | |
| parent | Add MemoryCidStore and ChunkStore interface (#940) (diff) | |
| download | zen-c49e5b15e0f86080d7d33e4e31aecfb701f8f96f.tar.xz zen-c49e5b15e0f86080d7d33e4e31aecfb701f8f96f.zip | |
Some minor polish from tourist branch (#949)
- Replace per-type fmt::formatter specializations (StringBuilderBase, NiceBase) with a single generic formatter using a HasStringViewConversion concept
- Add ThousandsNum for comma-separated integer formatting (e.g. "1,234,567")
- Thread naming now accepts a sort hint for trace ordering
- Fix main thread trace registration to use actual thread ID and sort first
- Add ExpandEnvironmentVariables() for expanding %VAR% references in strings, with tests
- Add ParseHexBytes() overload with expected byte count validation
- Add Flag_BelowNormalPriority to CreateProcOptions (BELOW_NORMAL_PRIORITY_CLASS on Windows, setpriority on POSIX)
- Add PrettyScroll progress bar mode that pins the status line to the bottom of the terminal using scroll regions, with signal handler cleanup for Ctrl+C/SIGTERM
Diffstat (limited to 'src/zencore/thread.cpp')
| -rw-r--r-- | src/zencore/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp index 067e66c0d..fd72afaa7 100644 --- a/src/zencore/thread.cpp +++ b/src/zencore/thread.cpp @@ -99,7 +99,7 @@ SetNameInternal(DWORD thread_id, const char* name) #endif void -SetCurrentThreadName([[maybe_unused]] std::string_view ThreadName) +SetCurrentThreadName([[maybe_unused]] std::string_view ThreadName, [[maybe_unused]] int32_t SortHint) { constexpr std::string_view::size_type MaxThreadNameLength = 255; std::string_view LimitedThreadName = ThreadName.substr(0, MaxThreadNameLength); @@ -108,7 +108,7 @@ SetCurrentThreadName([[maybe_unused]] std::string_view ThreadName) const int ThreadId = GetCurrentThreadId(); #if ZEN_WITH_TRACE - trace::ThreadRegister(ThreadNameZ.c_str(), /* system id */ ThreadId, /* sort id */ 0); + trace::ThreadRegister(ThreadNameZ.c_str(), /* system id */ ThreadId, /* sort id */ SortHint); #endif // ZEN_WITH_TRACE #if ZEN_PLATFORM_WINDOWS |