1#include "duckdb/main/valid_checker.hpp"
2
3namespace duckdb {
4
5ValidChecker::ValidChecker() : is_invalidated(false) {
6}
7
8void ValidChecker::Invalidate(string error) {
9 lock_guard<mutex> l(invalidate_lock);
10 this->is_invalidated = true;
11 this->invalidated_msg = std::move(error);
12}
13
14bool ValidChecker::IsInvalidated() {
15 return this->is_invalidated;
16}
17
18string ValidChecker::InvalidatedMessage() {
19 lock_guard<mutex> l(invalidate_lock);
20 return invalidated_msg;
21}
22} // namespace duckdb
23