summaryrefslogtreecommitdiff
path: root/indra/llcommon/threadpool.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-11-23 15:41:46 -0500
committerNat Goodspeed <nat@lindenlab.com>2021-11-23 15:41:46 -0500
commit6d36038e4098ebe7334284fc9b3fb76bc116c106 (patch)
tree18c7949f018a87bb354f6a50d32d38829e177635 /indra/llcommon/threadpool.cpp
parent37900e593d65e93913774f118a9aa461eeb8ef58 (diff)
parent744646eb71fd9d1d1161ae1132bfe8a9a2c7dd9d (diff)
Merge branch 'glthread' of ssh://bitbucket.org/lindenlab/viewer into glthreadx
Diffstat (limited to 'indra/llcommon/threadpool.cpp')
-rw-r--r--indra/llcommon/threadpool.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp
index cf25cc838e..06e0dc5bfc 100644
--- a/indra/llcommon/threadpool.cpp
+++ b/indra/llcommon/threadpool.cpp
@@ -28,7 +28,11 @@ LL::ThreadPool::ThreadPool(const std::string& name, size_t threads, size_t capac
for (size_t i = 0; i < threads; ++i)
{
std::string tname{ STRINGIZE(mName << ':' << (i+1) << '/' << threads) };
- mThreads.emplace_back(tname, [this, tname](){ run(tname); });
+ mThreads.emplace_back(tname, [this, tname]()
+ {
+ LL_PROFILER_SET_THREAD_NAME(tname.c_str());
+ run(tname);
+ });
}
// Listen on "LLApp", and when the app is shutting down, close the queue
// and join the workers.