Skip to content
Snippets Groups Projects

Used the pthread_setcancelstate function to configure where the thread can be cancelled.

Merged Sergi Hernandez requested to merge pthread_cancel into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
+ 9
0
@@ -261,6 +261,15 @@ void *CComm::comm_thread(void *param)
}
comm_dev->access_comm.exit();
}catch(CException &e){
try{
comm_dev->hard_close();
}catch(CException &close){
std::cout << close.what() << std::endl;
}
/* flush the data queues */
comm_dev->receive_queue.flush();
/* change the current state */
comm_dev->state=created;
comm_dev->access_comm.exit();
std::cout << e.what() << std::endl;
end=true;
Loading