| 96 | } |
| 97 | |
| 98 | void PythonScriptManagerState::clear() { |
| 99 | std::uint64_t generation = 0; |
| 100 | { |
| 101 | std::lock_guard lock(mutex_); |
| 102 | if (!scripts_.empty() || needs_reload_) { |
| 103 | generation = ++generation_; |
| 104 | } |
| 105 | scripts_.clear(); |
| 106 | needs_reload_ = false; |
| 107 | } |
| 108 | publishScriptsGeneration(generation); |
| 109 | } |
| 110 | |
| 111 | std::vector<ScriptInfo> PythonScriptManagerState::scriptsSnapshot() const { |
| 112 | std::lock_guard lock(mutex_); |
no test coverage detected