
17 Sep
2005
17 Sep
'05
9:07 a.m.
Hi. I'm definitely no expert on this, but there's something that bothers me about conditions in general and this implementation in particular. The Win32 CriticalSection used is a *recursive* mutex. Meaning that the LeaveCriticalSection() used inside pthread_cond_wait() doesn't guaranty the the mutex is actually unlocked. Insuring this requires counting the number of times the mutex was locked before entering pthread_cond_wait(). Is this a problem? Is there any reference to the difference between a condition with recursive mutex to a condition with non-recursive mutex? Just some thoughts I wanted to share... Yuval