| 255 | } |
| 256 | |
| 257 | void BaseIndex::Start() |
| 258 | { |
| 259 | // Need to register this ValidationInterface before running Init(), so that |
| 260 | // callbacks are not missed if Init sets m_synced to true. |
| 261 | RegisterValidationInterface(this); |
| 262 | if (!Init()) { |
| 263 | FatalError("%s: %s failed to initialize", __func__, GetName()); |
| 264 | return; |
| 265 | } |
| 266 | |
| 267 | m_thread_sync = std::thread(&TraceThread<std::function<void()>>, GetName(), |
| 268 | std::bind(&BaseIndex::ThreadSync, this)); |
| 269 | } |
| 270 | |
| 271 | void BaseIndex::Stop() |
| 272 | { |