From 296a0da4fcbd31d1fe7d900452580a4a571a0f26 Mon Sep 17 00:00:00 2001 From: Igor Ganichev Date: Fri, 12 Jul 2019 15:27:03 -0700 Subject: [PATCH] Remove unused EagerContext::child_threads_ PiperOrigin-RevId: 257879975 --- tensorflow/core/common_runtime/eager/context.cc | 8 -------- tensorflow/core/common_runtime/eager/context.h | 4 ---- 2 files changed, 12 deletions(-) diff --git a/tensorflow/core/common_runtime/eager/context.cc b/tensorflow/core/common_runtime/eager/context.cc index ef2905bc018..1b7be809f68 100644 --- a/tensorflow/core/common_runtime/eager/context.cc +++ b/tensorflow/core/common_runtime/eager/context.cc @@ -266,10 +266,6 @@ EagerContext::~EagerContext() { executor_.WaitForAllPendingNodes().IgnoreError(); rendezvous_->Unref(); - for (auto& thread : child_threads_) { - thread.reset(); - } - // Release resources ahead of destroying the device manager as the resource // destructors (e.g. ~IteratorResource) assume devices still exist. for (auto device : local_device_mgr()->ListDevices()) { @@ -277,10 +273,6 @@ EagerContext::~EagerContext() { } } -void EagerContext::AddChildThread(std::unique_ptr thread) { - child_threads_.push_back(std::move(thread)); -} - bool EagerContext::FindFunctionByName(const string& name) { mutex_lock l(functions_mu_); return func_lib_def_.Find(name) != nullptr; diff --git a/tensorflow/core/common_runtime/eager/context.h b/tensorflow/core/common_runtime/eager/context.h index 774fa0e43f8..054cf2e3e4b 100644 --- a/tensorflow/core/common_runtime/eager/context.h +++ b/tensorflow/core/common_runtime/eager/context.h @@ -323,9 +323,6 @@ class EagerContext : public core::RefCounted { tensorflow::Env* TFEnv() const { return env_; } - // All child threads will be reset() when destructing EagerContext. - void AddChildThread(std::unique_ptr thread); - Status FindDeviceFromName(const char* device_name, Device** device) const; bool IsLocal(const Device* d) const; @@ -454,7 +451,6 @@ class EagerContext : public core::RefCounted { bool use_send_tensor_rpc_; const bool pin_small_ops_to_cpu_; - std::vector> child_threads_; }; } // namespace tensorflow