diff options
author | Yuefeng Zhou <yuefengz@google.com> | 2016-10-31 11:05:06 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-10-31 12:20:56 -0700 |
commit | 9b0a028e792174be92805b21c24f27facee50931 (patch) | |
tree | 98ab00270409fff7a4483d914afc3e74ed871e7e /tensorflow/cc/training | |
parent | 0d616c45650b8bef5da330d311bf265896328db3 (diff) |
Add GetStatus function in QueueRunner.
Change: 137731250
Diffstat (limited to 'tensorflow/cc/training')
-rw-r--r-- | tensorflow/cc/training/queue_runner.cc | 5 | ||||
-rw-r--r-- | tensorflow/cc/training/queue_runner.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/cc/training/queue_runner.cc b/tensorflow/cc/training/queue_runner.cc index 216abb7236..371d528143 100644 --- a/tensorflow/cc/training/queue_runner.cc +++ b/tensorflow/cc/training/queue_runner.cc @@ -132,4 +132,9 @@ void QueueRunner::Run(Session* sess, const string& enqueue_op) { } } +Status QueueRunner::GetStatus() { + mutex_lock l(mu_); + return status_; +} + } // namespace tensorflow diff --git a/tensorflow/cc/training/queue_runner.h b/tensorflow/cc/training/queue_runner.h index c3fe4026ef..fd0cbebe34 100644 --- a/tensorflow/cc/training/queue_runner.h +++ b/tensorflow/cc/training/queue_runner.h @@ -57,6 +57,9 @@ class QueueRunner { // otherwise returns the first captured failure status. Status Join(); + // Returns the lastest status. + Status GetStatus(); + private: // The Run function for each thread. void Run(Session* sess, const string& enqueue_op); |