| 9 | } |
| 10 | |
| 11 | void LoopRunner::Start(std::function<void()> loop_body) |
| 12 | { |
| 13 | XASSERT(!running_.load(), "LoopRunner is already running."); |
| 14 | |
| 15 | running_.store(true); |
| 16 | thread_ = std::make_unique<std::thread>(&LoopRunner::Loop, this, loop_body); |
| 17 | } |
| 18 | |
| 19 | void LoopRunner::Stop() |
| 20 | { |
nothing calls this directly
no outgoing calls
no test coverage detected