| 148 | } |
| 149 | |
| 150 | void EagerExecutor::ClearError() { |
| 151 | tensorflow::mutex_lock l(node_queue_mutex_); |
| 152 | // TODO(iga): Check state_ and return an error if it is not kActive. |
| 153 | if (status_.ok()) return; |
| 154 | // If an error was set, node_done_notifications_ and node_queue_ should have |
| 155 | // been cleared, and no new entries should have been added since. |
| 156 | DCHECK(node_done_notifications_.empty()); |
| 157 | DCHECK(node_queue_.empty()); |
| 158 | status_ = tensorflow::Status::OK(); |
| 159 | nodes_pending_.notify_all(); |
| 160 | } |
| 161 | |
| 162 | tensorflow::Status EagerExecutor::status() const { |
| 163 | tf_shared_lock l(node_queue_mutex_); |
no test coverage detected