pthread_mutex_lock etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
pthread_mutex_lock etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

19 Ağustos 2020 Çarşamba

pthread_mutex_unlock metodu

Giriş
Mutex üzerinde bekleyen hangi thread'in uyandıralacağı tanımlı değil. Açıklaması şöyle
If there are threads blocked on the mutex object referenced by mutex when pthread_mutex_unlock() is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex.
Örnek
Şöyle yaparız.
pthread_mutex_unlock (&mutex);