From 1c3509f7d3a7e24a23b8cd759530dc184402bb92 Mon Sep 17 00:00:00 2001 From: Tommi Date: Tue, 6 Feb 2018 08:49:12 +0100 Subject: [PATCH] Assign names to signaling and worker threads in OrtcFactory. This can be helpful when debugging or analyzing logcats. Bug: webrtc:8841 Change-Id: Ic3a18ee68321edbffd92e57ccb84a7b2710e16bd Reviewed-on: https://webrtc-review.googlesource.com/47881 Commit-Queue: Tommi Reviewed-by: Taylor Brandstetter Cr-Commit-Position: refs/heads/master@{#21897} --- ortc/ortcfactory.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ortc/ortcfactory.cc b/ortc/ortcfactory.cc index c64898516b..f891561b86 100644 --- a/ortc/ortcfactory.cc +++ b/ortc/ortcfactory.cc @@ -195,6 +195,7 @@ OrtcFactory::OrtcFactory( // The worker thread is created internally because it's an implementation // detail, and consumers of the API don't need to really know about it. worker_thread_ = rtc::Thread::Create(); + worker_thread_->SetName("ORTC-worker", this); worker_thread_->Start(); if (signaling_thread_) { @@ -208,6 +209,11 @@ OrtcFactory::OrtcFactory( wraps_signaling_thread_ = true; } } + + if (signaling_thread_->name().empty()) { + signaling_thread_->SetName("ORTC-signaling", this); + } + if (!network_manager_) { owned_network_manager_.reset(new rtc::BasicNetworkManager()); network_manager_ = owned_network_manager_.get();