| 99 | SensorPipeline& operator=(const SensorPipeline&) = delete; |
| 100 | |
| 101 | void start() { |
| 102 | running_ = true; |
| 103 | producer_ = std::thread(&SensorPipeline::producerLoop, this); |
| 104 | consumer_ = std::thread(&SensorPipeline::consumerLoop, this); |
| 105 | } |
| 106 | |
| 107 | void stop() { |
| 108 | if (!running_.exchange(false)) return; // Already stopped |