refine threadpool mutex, remove unlock before destroying, unlocking twice is undefined behaviour

This commit is contained in:
helfenstein_p
2017-12-11 18:02:33 +01:00
parent bb3e5351b4
commit 03de29de90
3 changed files with 12 additions and 9 deletions

View File

@ -7,7 +7,7 @@ Mutex::Mutex() {
Mutex::~Mutex() {
while(is_locked);
unlock(); // Unlock Mutex after shared resource is safe
//unlock(); // Unlock Mutex after shared resource is safe
pthread_mutex_destroy(&m_lock);
}