Skip to content

Commit

Permalink
API Doc: Moved the usual termination code into a finally block (tenso…
Browse files Browse the repository at this point in the history
  • Loading branch information
qbx2 authored and Vijay Vasudevan committed May 11, 2016
1 parent 5681406 commit d3d1a63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tensorflow/g3doc/how_tos/threading_and_queues/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ try:
break
sess.run(train_op)
except Exception, e:
# Report exceptions to the coordinator.
coord.request_stop(e)

# Terminate as usual. It is innocuous to request stop twice.
coord.request_stop()
coord.join(threads)
# Report exceptions to the coordinator.
coord.request_stop(e)
finally:
# Terminate as usual. It is innocuous to request stop twice.
coord.request_stop()
coord.join(threads)
```

0 comments on commit d3d1a63

Please sign in to comment.