Used the pthread_setcancelstate function to configure where the thread can be cancelled.
Compare changes
- Sergi Hernandez authored
Added a mutex unlock in the exception catch in the thread to avoid blocking when an error occurs.
+ 13
− 10
@@ -4,6 +4,7 @@
@@ -4,6 +4,7 @@
@@ -212,7 +213,9 @@ void CComm::close(void)
@@ -212,7 +213,9 @@ void CComm::close(void)
@@ -238,7 +241,9 @@ void *CComm::comm_thread(void *param)
@@ -238,7 +241,9 @@ void *CComm::comm_thread(void *param)
@@ -256,6 +261,8 @@ void *CComm::comm_thread(void *param)
@@ -256,6 +261,8 @@ void *CComm::comm_thread(void *param)
@@ -309,16 +316,12 @@ void CComm::on_error(void)
@@ -309,16 +316,12 @@ void CComm::on_error(void)