+ // In the case, we didn't start the thread, all these mutex are locked:
+ // we must unlock them.
+ if (m_mutex.IsLocked())
+ m_mutex.Unlock();
+
+ if (m_end_mutex.IsLocked())
+ m_end_mutex.Unlock();
+
+ if (m_mutexSuspend.IsLocked())
+ m_mutexSuspend.Unlock();