ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
24.7k stars 9.62k forks source link

Is this a bug of PlayTaskProducer? #15380

Open Wuqiqi123 opened 2 months ago

Wuqiqi123 commented 2 months ago

Just like the code in PlayTaskProducer::Stop, if the is_stopped_ is false(running), stop function will just return directly. https://github.com/ApolloAuto/apollo/blob/22cb4d8f98ebef1d73be4b1b614e8153fb41f03f/cyber/tools/cyber_recorder/player/play_task_producer.cc#L95-L103 Is this changes right?

-   if (!is_stopped_.exchange(true)) { 
+   if (is_stopped_.exchange(true)) { 
     return; 
   } 

Also the PlayTaskConsume::Stop looks right here. https://github.com/ApolloAuto/apollo/blob/22cb4d8f98ebef1d73be4b1b614e8153fb41f03f/cyber/tools/cyber_recorder/player/play_task_consumer.cc#L58-L70