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 <tommi@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21897}
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user