1 | #include "duckdb/main/valid_checker.hpp" |
---|---|
2 | |
3 | namespace duckdb { |
4 | |
5 | ValidChecker::ValidChecker() : is_invalidated(false) { |
6 | } |
7 | |
8 | void 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 | |
14 | bool ValidChecker::IsInvalidated() { |
15 | return this->is_invalidated; |
16 | } |
17 | |
18 | string ValidChecker::InvalidatedMessage() { |
19 | lock_guard<mutex> l(invalidate_lock); |
20 | return invalidated_msg; |
21 | } |
22 | } // namespace duckdb |
23 |