aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-08-15 10:15:10 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-15 10:32:05 -0700
commitf82e6273e0868b1e1aa51a783aa2676a268b2f55 (patch)
treed04a15f2a57f46e7f482ea5f84678f341156430f
parent22eab4bb57fad99a338bd2ec1ad61e5044a50f75 (diff)
Running session.close if coordinator can't kill all threads.
PiperOrigin-RevId: 165323095
-rw-r--r--tensorflow/contrib/slim/python/slim/queues.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/contrib/slim/python/slim/queues.py b/tensorflow/contrib/slim/python/slim/queues.py
index 86c7296b43..1bc8d2c89b 100644
--- a/tensorflow/contrib/slim/python/slim/queues.py
+++ b/tensorflow/contrib/slim/python/slim/queues.py
@@ -66,6 +66,9 @@ def QueueRunners(session):
yield
finally:
coord.request_stop()
- coord.join(threads, stop_grace_period_secs=120)
+ try:
+ coord.join(threads, stop_grace_period_secs=120)
+ except RuntimeError:
+ session.close()
_queue_runner_lock.release()