aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime/worker_interface.h
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2017-11-15 14:07:41 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-15 14:12:16 -0800
commitfdff4048d4d0fdf7c12f927b92bb5e2fb812df12 (patch)
tree806544c485973a3f1e2d8e09eb6b9e4094e53060 /tensorflow/core/distributed_runtime/worker_interface.h
parentb0bcf675a4b5d6217f3b58fd27b344f20e7bf25d (diff)
Add `WorkerService.DeleteWorkerSession` method to fix a memory leak.
The new method is the counterpart to `WorkerService.CreateWorkerSession`, and is called in all cases where worker sessions have been explicitly created (i.e. when using ClusterSpec propagation). PiperOrigin-RevId: 175877407
Diffstat (limited to 'tensorflow/core/distributed_runtime/worker_interface.h')
-rw-r--r--tensorflow/core/distributed_runtime/worker_interface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/core/distributed_runtime/worker_interface.h b/tensorflow/core/distributed_runtime/worker_interface.h
index c9db28ec67..4c58bf41a4 100644
--- a/tensorflow/core/distributed_runtime/worker_interface.h
+++ b/tensorflow/core/distributed_runtime/worker_interface.h
@@ -44,6 +44,10 @@ class WorkerInterface {
const CreateWorkerSessionRequest* request,
CreateWorkerSessionResponse* response, StatusCallback done) = 0;
+ virtual void DeleteWorkerSessionAsync(
+ const DeleteWorkerSessionRequest* request,
+ DeleteWorkerSessionResponse* response, StatusCallback done) = 0;
+
virtual void RegisterGraphAsync(const RegisterGraphRequest* request,
RegisterGraphResponse* response,
StatusCallback done) = 0;
@@ -118,6 +122,11 @@ class WorkerInterface {
return CallAndWait(&ME::CreateWorkerSessionAsync, request, response);
}
+ Status DeleteWorkerSession(const DeleteWorkerSessionRequest* request,
+ DeleteWorkerSessionResponse* response) {
+ return CallAndWait(&ME::DeleteWorkerSessionAsync, request, response);
+ }
+
Status RegisterGraph(const RegisterGraphRequest* request,
RegisterGraphResponse* response) {
return CallAndWait(&ME::RegisterGraphAsync, request, response);