clarify thread names

This commit is contained in:
Lion Kortlepel
2021-11-21 03:19:02 +01:00
parent 097e52674b
commit 7169e65305
3 changed files with 20 additions and 15 deletions
+1
View File
@@ -48,6 +48,7 @@ void TLuaEngine::operator()() {
}
auto ResultCheckThread = std::thread([&] {
RegisterThread("ResultCheckThread");
while (!mShutdown) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::unique_lock Lock(mResultsToCheckMutex);
+3
View File
@@ -461,6 +461,7 @@ void TNetwork::ClientKick(TClient& c, const std::string& R) {
}
void TNetwork::Looper(const std::weak_ptr<TClient>& c) {
RegisterThreadAuto();
while (!c.expired()) {
auto Client = c.lock();
if (Client->GetStatus() < 0) {
@@ -707,9 +708,11 @@ void TNetwork::SendFile(TClient& c, const std::string& UnsafeName) {
std::thread SplitThreads[2] {
std::thread([&] {
RegisterThread("SplitLoad_0");
SplitLoad(c, 0, MSize, false, FileName);
}),
std::thread([&] {
RegisterThread("SplitLoad_1");
SplitLoad(c, MSize, Size, true, FileName);
})
};
+1
View File
@@ -61,6 +61,7 @@ int main(int argc, char** argv) try {
Application::Console().InitializeLuaConsole(LuaEngine);
Application::CheckForUpdates();
RegisterThread("Main(Waiting)");
while (!Shutdown) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}