diff options
Diffstat (limited to 'CAN-binder/low-can-binding/can')
-rw-r--r-- | CAN-binder/low-can-binding/can/can-bus.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp index 78a823c0..5e7ac27d 100644 --- a/CAN-binder/low-can-binding/can/can-bus.cpp +++ b/CAN-binder/low-can-binding/can/can-bus.cpp @@ -206,13 +206,11 @@ void can_bus_t::start_threads() { is_decoding_ = true; th_decoding_ = std::thread(&can_bus_t::can_decode_message, this); - if(!th_decoding_.joinable()) - is_decoding_ = false; + th_decoding_.detach(); is_pushing_ = true; th_pushing_ = std::thread(&can_bus_t::can_event_push, this); - if(!th_pushing_.joinable()) - is_pushing_ = false; + th_pushing_.detach(); } /// @brief Will stop all threads holded by can_bus_t object |