diff options
author | Dan Ringwalt <ringwalt@google.com> | 2017-05-05 09:09:05 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-05 10:26:00 -0700 |
commit | 692fad20f913ffa2cb874a87578ecabb03cc4557 (patch) | |
tree | 172717f537c91b0d1ac0366731b4eb2093fb743b /tensorflow/python/summary | |
parent | b329dd821e29e64c93b1b9bf38e61871c6cb53da (diff) |
Merge changes from github.
Change: 155209832
Diffstat (limited to 'tensorflow/python/summary')
-rw-r--r-- | tensorflow/python/summary/writer/writer_cache.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/python/summary/writer/writer_cache.py b/tensorflow/python/summary/writer/writer_cache.py index 21870e788e..bad289303c 100644 --- a/tensorflow/python/summary/writer/writer_cache.py +++ b/tensorflow/python/summary/writer/writer_cache.py @@ -39,6 +39,10 @@ class FileWriterCache(object): def clear(): """Clear cached summary writers. Currently only used for unit tests.""" with FileWriterCache._lock: + # Make sure all the writers are closed now (otherwise open file handles + # may hang around, blocking deletions on Windows). + for item in FileWriterCache._cache.values(): + item.close() FileWriterCache._cache = {} @staticmethod |