Ignoring the return value of pthread_mutex_trylock is always a bug. There is no other way to check if the mutex is locked or not after the call.
Ignoring the return value of pthread_mutex_trylock is always a bug. There is no other way to check if the mutex is locked or not after the call.