Wrong call to thread.join cause deadlock and thread termination.
authorRomain Forlot <romain.forlot@iot.bzh>
Wed, 1 Mar 2017 16:07:20 +0000 (17:07 +0100)
committerRomain Forlot <romain.forlot@iot.bzh>
Wed, 1 Mar 2017 16:07:20 +0000 (17:07 +0100)
Positionning the controlling boolean value will be enough for now

Change-Id: I28e2d175e23370746cc30c2403829ebdeec7c2bb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
src/can-bus.cpp

index 81dee9a..52c81cf 100644 (file)
@@ -143,8 +143,6 @@ void can_bus_t::stop_threads()
 {
        is_decoding_ = false;
        is_pushing_ = false;
-       th_decoding_.join();
-       th_pushing_.join();
 }
 
 int can_bus_t::init_can_dev()
@@ -396,7 +394,6 @@ void can_bus_dev_t::start_reading(can_bus_t& can_bus)
 void can_bus_dev_t::stop_reading()
 {
        is_running_ = false;
-       th_reading_.join();
 }
 
 void can_bus_dev_t::can_reader(can_bus_t& can_bus)