| 2372 | } |
| 2373 | |
| 2374 | ::tensorflow::Status DirectSession::Close() { |
| 2375 | cancellation_manager_->StartCancel(); |
| 2376 | { |
| 2377 | mutex_lock l(closed_lock_); |
| 2378 | if (closed_) return ::tensorflow::Status::OK(); |
| 2379 | closed_ = true; |
| 2380 | } |
| 2381 | if (factory_ != nullptr) factory_->Deregister(this); |
| 2382 | return ::tensorflow::Status::OK(); |
| 2383 | } |
| 2384 | |
| 2385 | DirectSession::RunState::RunState( |
| 2386 | const std::vector<string>& pending_input_names, |