Pthread Mutexes

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

You can also initialize a mutex statically as follows:


pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER


which you don't have to destroy.

vernsalgorithm
Автор

What is the point of trylock, doesn't lock do exactly the same thing? If it's already locked it just won't work. Will there be a compiler error?

ivankontra