[coll] Improve column split tests with named threads. (#10735)

This commit is contained in:
Jiaming Yuan
2024-08-24 12:43:47 +08:00
committed by GitHub
parent 55aef8f546
commit fd0138c91c
10 changed files with 72 additions and 37 deletions

View File

@@ -14,6 +14,7 @@
#include <thread> // for thread
#include <utility> // for move
#include "../common/threading_utils.h" // for NameThread
#include "xgboost/collective/poll_utils.h" // for PollHelper
#include "xgboost/collective/result.h" // for Fail, Success
#include "xgboost/collective/socket.h" // for FailWithCode
@@ -271,5 +272,6 @@ Loop::Loop(std::chrono::seconds timeout) : timeout_{timeout} {
worker_ = std::thread{[this] {
this->Process();
}};
common::NameThread(&worker_, "lw");
}
} // namespace xgboost::collective

View File

@@ -23,6 +23,7 @@
#include <utility> // for move, forward
#include "../common/json_utils.h"
#include "../common/threading_utils.h" // for NameThread
#include "comm.h"
#include "protocol.h" // for kMagic, PeerInfo
#include "tracker.h"
@@ -143,6 +144,8 @@ Result RabitTracker::Bootstrap(std::vector<WorkerProxy>* p_workers) {
Json::Dump(jnext, &str);
worker.Send(StringView{str});
});
std::string name = "tkbs_t-" + std::to_string(r);
common::NameThread(&bootstrap_threads.back(), name.c_str());
}
for (auto& t : bootstrap_threads) {