mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[Core][Tiny]Shorter thread name (#23222)
In linux the thread name could not be longer than 15 chars. When we use command like top, we are easy being confused by similar thread name like `resource_report_poller` and `resource_report_broadcaster` because they are both show `resource_report`. This pr uses abbr to make the thread names shorter.
This commit is contained in:
parent
ea51017e52
commit
b4bc8809dc
3 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ GcsServerAddressUpdater::GcsServerAddressUpdater(
|
|||
update_func_(update_func),
|
||||
updater_runner_(updater_io_service_),
|
||||
updater_thread_([this] {
|
||||
SetThreadName("gcs_address_updater");
|
||||
SetThreadName("gcs_addr_updater");
|
||||
std::thread::id this_id = std::this_thread::get_id();
|
||||
RAY_LOG(INFO) << "GCS Server updater thread id: " << this_id;
|
||||
/// The asio work to keep io_service_ alive.
|
||||
|
|
|
@ -45,7 +45,7 @@ void GcsResourceReportPoller::Initialize(const GcsInitData &gcs_init_data) {
|
|||
|
||||
void GcsResourceReportPoller::Start() {
|
||||
polling_thread_.reset(new std::thread{[this]() {
|
||||
SetThreadName("resource_report_poller");
|
||||
SetThreadName("resource_poller");
|
||||
boost::asio::io_service::work work(polling_service_);
|
||||
|
||||
polling_service_.run();
|
||||
|
|
|
@ -53,7 +53,7 @@ class RaySyncer {
|
|||
void Start() {
|
||||
poller_->Start();
|
||||
broadcast_thread_ = std::make_unique<std::thread>([this]() {
|
||||
SetThreadName("resource_report_broadcaster");
|
||||
SetThreadName("resource_bcast");
|
||||
boost::asio::io_service::work work(broadcast_service_);
|
||||
broadcast_service_.run();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue