diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 17:55:52 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-15 17:55:52 +0200 |
| commit | 14f4baabfa56eedb7b71235b951e993da4f641ef (patch) | |
| tree | 86c08838a0179ae15910b791a1412c448340020d /src/zenserver/upstream/upstreamcache.cpp | |
| parent | v0.2.11 (diff) | |
| download | zen-14f4baabfa56eedb7b71235b951e993da4f641ef.tar.xz zen-14f4baabfa56eedb7b71235b951e993da4f641ef.zip | |
all threads should be named (#304)
* added WorkerThreadPool naming, packaged_task support
* name the http.sys thread pool service threads
* added http.sys I/O threadpool naming
* upstream cache I/O thread naming
Diffstat (limited to 'src/zenserver/upstream/upstreamcache.cpp')
| -rw-r--r-- | src/zenserver/upstream/upstreamcache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zenserver/upstream/upstreamcache.cpp b/src/zenserver/upstream/upstreamcache.cpp index 245097796..2a9e67c06 100644 --- a/src/zenserver/upstream/upstreamcache.cpp +++ b/src/zenserver/upstream/upstreamcache.cpp @@ -1490,7 +1490,7 @@ public: { for (uint32_t Idx = 0; Idx < m_Options.ThreadCount; Idx++) { - m_UpstreamThreads.emplace_back(&UpstreamCacheImpl::ProcessUpstreamQueue, this); + m_UpstreamThreads.emplace_back(&UpstreamCacheImpl::ProcessUpstreamQueue, this, Idx + 1); } m_EndpointMonitorThread = std::thread(&UpstreamCacheImpl::MonitorEndpoints, this); @@ -1947,8 +1947,11 @@ private: } } - void ProcessUpstreamQueue() + void ProcessUpstreamQueue(int ThreadIndex) { + std::string ThreadName = fmt::format("upstream_{}", ThreadIndex); + SetCurrentThreadName(ThreadName); + for (;;) { UpstreamCacheRecord CacheRecord; |