| 485 | } |
| 486 | |
| 487 | Status SessionRef::Close(const RunOptions& run_options) { |
| 488 | TF_RETURN_IF_ERROR(CheckNotClosed()); |
| 489 | mutex_lock l(run_lock_); |
| 490 | Status status; |
| 491 | if (logger_) { |
| 492 | status = logger_->RecordClose(session_.get(), run_options); |
| 493 | } else { |
| 494 | status = session_->Close(run_options); |
| 495 | } |
| 496 | session_.reset(); |
| 497 | while (run_count_ > 0) { |
| 498 | run_finished_.wait(l); |
| 499 | } |
| 500 | return status; |
| 501 | } |
| 502 | |
| 503 | Status SessionRef::Close() { |
| 504 | TF_RETURN_IF_ERROR(CheckNotClosed()); |
no test coverage detected